[Erp5-report] r21581 - /erp5/trunk/products/ERP5/Extensions/CheckPortalTypes.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Jun 13 15:03:15 CEST 2008
Author: jerome
Date: Fri Jun 13 15:03:04 2008
New Revision: 21581
URL: http://svn.erp5.org?rev=21581&view=rev
Log:
code to migrate Invoice Transaction Rule matrix index to new cell range from r20475.
Modified:
erp5/trunk/products/ERP5/Extensions/CheckPortalTypes.py
Modified: erp5/trunk/products/ERP5/Extensions/CheckPortalTypes.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Extensions/CheckPortalTypes.py?rev=21581&r1=21580&r2=21581&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Extensions/CheckPortalTypes.py (original)
+++ erp5/trunk/products/ERP5/Extensions/CheckPortalTypes.py Fri Jun 13 15:03:04 2008
@@ -100,3 +100,17 @@
career.workflow_history._p_changed = 1
career.reindexObject()
+def updateInvoiceTransactionRule(self):
+ """Invoice Transaction Rule now uses ID instead of relative urls for cell
+ coordinates (r20475)
+ """
+ assert self.getPortalType() == 'Invoice Transaction Rule'
+ movement_index = aq_base(self).index['movement']
+ for index, coordinate_dict in movement_index.items():
+ fixed_coordinate_list = []
+ for coord, index in coordinate_dict.items():
+ new_coord = coord.split('/')[-1]
+ coordinate_dict[new_coord] = coordinate_dict.pop(coord)
+ # ( coordinate_dict is a persistent mapping, so no need to mark the
+ # object as _p_changed )
+
More information about the Erp5-report
mailing list