[Erp5-report] r45189 leonardo - in /erp5/trunk/bt5/erp5_simulation_legacy: DocumentTemplate...

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Apr 7 19:09:35 CEST 2011


Author: leonardo
Date: Thu Apr  7 19:09:34 2011
New Revision: 45189

URL: http://svn.erp5.org?rev=45189&view=rev
Log:
Future method for Simulation Movement: Don't try to search successor trade_phases when looking up expand rules

Modified:
    erp5/trunk/bt5/erp5_simulation_legacy/DocumentTemplateItem/SimulationLegacyPatches.py
    erp5/trunk/bt5/erp5_simulation_legacy/bt/revision

Modified: erp5/trunk/bt5/erp5_simulation_legacy/DocumentTemplateItem/SimulationLegacyPatches.py
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_simulation_legacy/DocumentTemplateItem/SimulationLegacyPatches.py?rev=45189&r1=45188&r2=45189&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_simulation_legacy/DocumentTemplateItem/SimulationLegacyPatches.py [utf8] (original)
+++ erp5/trunk/bt5/erp5_simulation_legacy/DocumentTemplateItem/SimulationLegacyPatches.py [utf8] Thu Apr  7 19:09:34 2011
@@ -143,4 +143,15 @@ def patch():
 
   SimulationMovement.isBuildable = isBuildable
 
+  def _getApplicableRuleList(self):
+    """ Search rules that match this movement, but don't try to look up
+        successor trade_phases
+    """
+    portal_rules = self.getPortalObject().portal_rules
+    return portal_rules.searchRuleList(self,
+                                       sort_on='version',
+                                       sort_order='descending')
+
+  SimulationMovement._getApplicableRuleList = _getApplicableRuleList
+
 patch()

Modified: erp5/trunk/bt5/erp5_simulation_legacy/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_simulation_legacy/bt/revision?rev=45189&r1=45188&r2=45189&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_simulation_legacy/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_simulation_legacy/bt/revision [utf8] Thu Apr  7 19:09:34 2011
@@ -1 +1 @@
-12
\ No newline at end of file
+13
\ No newline at end of file



More information about the Erp5-report mailing list