From 14fb49a5c1145bfba6428e5dbf93772f53848a9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Thu, 23 Apr 2009 12:06:15 +0000 Subject: [PATCH] When the cell range changes, MatrixBox.renameCellRange tries to keep existing cells, by just change their ids. When this happens, the cell id changes, the cell is removed (then unindexed), and added again with its new id (then reindexed). The bug here is that the cell was unindexed with its new id, and indexing messages were not flushed, because the path was not the same. The fix is to delete the cell before changing its id. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26610 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/XMLMatrix.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/product/ERP5Type/XMLMatrix.py b/product/ERP5Type/XMLMatrix.py index dd1626c213..b2dffe77c2 100644 --- a/product/ERP5Type/XMLMatrix.py +++ b/product/ERP5Type/XMLMatrix.py @@ -430,10 +430,10 @@ class XMLMatrix(Folder): cell = self.get(old_id) if cell is not None: new_id = old_id + appended_id + self._delObject(old_id) cell.isIndexable = 0 cell.id = new_id self._setObject(new_id, aq_base(cell)) - self._delObject(old_id) cell.isIndexable = 1 cell.reindexObject() #cell.unindexObject(path='%s/%s' % (self.getUrl(), old_id)) @@ -444,10 +444,10 @@ class XMLMatrix(Folder): cell = self.get(old_id) if cell is not None: new_id = old_id[:-removed_id_len] + self._delObject(old_id) cell.isIndexable = 0 cell.id = new_id self._setObject(new_id, aq_base(cell)) - self._delObject(old_id) cell.isIndexable = 1 cell.reindexObject() #cell.unindexObject(path='%s/%s' % (self.getUrl(), old_id)) -- 2.30.9