[Erp5-report] r35788 kazuhiko - /erp5/trunk/products/ERP5Legacy/Document/Rule.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon May 31 15:59:04 CEST 2010


Author: kazuhiko
Date: Mon May 31 15:59:01 2010
New Revision: 35788

URL: http://svn.erp5.org?rev=35788&view=rev
Log:
do not propagate the id as the title in case of missing the title property, that was originally implemented in r28901.

Modified:
    erp5/trunk/products/ERP5Legacy/Document/Rule.py

Modified: erp5/trunk/products/ERP5Legacy/Document/Rule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Legacy/Document/Rule.py?rev=35788&r1=35787&r2=35788&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Legacy/Document/Rule.py [utf8] (original)
+++ erp5/trunk/products/ERP5Legacy/Document/Rule.py [utf8] Mon May 31 15:59:01 2010
@@ -591,7 +591,12 @@
 
     default_property_list = self.getExpandablePropertyList()
     for prop in default_property_list:
-      property_dict[prop] = movement.getProperty(prop)
+      # getProprety('title') returns the ID if title is not set, but we
+      # don't want to propagate such a value in simulation movements.
+      if prop in ('title',) and not movement.hasProperty(prop):
+        property_dict[prop] = None
+      else:
+        property_dict[prop] = movement.getProperty(prop)
 
     # rule specific
     property_dict.update(**self._getExpandablePropertyUpdateDict(applied_rule,




More information about the Erp5-report mailing list