[Erp5-report] r26610 - /erp5/trunk/products/ERP5Type/XMLMatrix.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Apr 23 14:06:20 CEST 2009


Author: jerome
Date: Thu Apr 23 14:06:15 2009
New Revision: 26610

URL: http://svn.erp5.org?rev=26610&view=rev
Log:
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.

Modified:
    erp5/trunk/products/ERP5Type/XMLMatrix.py

Modified: erp5/trunk/products/ERP5Type/XMLMatrix.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/XMLMatrix.py?rev=26610&r1=26609&r2=26610&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/XMLMatrix.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/XMLMatrix.py [utf8] Thu Apr 23 14:06:15 2009
@@ -430,10 +430,10 @@
           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 @@
           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))




More information about the Erp5-report mailing list