[Erp5-report] r25917 - /erp5/trunk/products/ERP5/Document/

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Mar 9 12:50:09 CET 2009


Author: kazuhiko
Date: Mon Mar  9 12:50:07 2009
New Revision: 25917

URL: http://svn.erp5.org?rev=25917&view=rev
Log:
since r.25757, searchMovementList() requires manager role if Simulation Movement is restricted.

Modified:
    erp5/trunk/products/ERP5/Document/DeliveryBuilder.py
    erp5/trunk/products/ERP5/Document/OrderBuilder.py

Modified: erp5/trunk/products/ERP5/Document/DeliveryBuilder.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/DeliveryBuilder.py?rev=25917&r1=25916&r2=25917&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/DeliveryBuilder.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/DeliveryBuilder.py [utf8] Mon Mar  9 12:50:07 2009
@@ -98,7 +98,7 @@
     """
     pass
 
-  def searchMovementList(self, applied_rule_uid=None,**kw):
+  def searchMovementList(self, *args, **kw):
     """
       defines how to query all Simulation Movements which meet certain criteria
       (including the above path path definition).
@@ -106,6 +106,11 @@
       First, select movement matching to criteria define on DeliveryBuilder
       Then, call script simulation_select_method to restrict movement_list
     """
+    searchMovementList = UnrestrictedMethod(self._searchMovementList)
+    return searchMovementList(*args, **kw)
+
+  def _searchMovementList(self, applied_rule_uid=None,**kw):
+    """This method is wrapped by UnrestrictedMethod."""
     movement_list = []
     # We only search Simulation Movement
     kw['portal_type'] = 'Simulation Movement'

Modified: erp5/trunk/products/ERP5/Document/OrderBuilder.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/OrderBuilder.py?rev=25917&r1=25916&r2=25917&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/OrderBuilder.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/OrderBuilder.py [utf8] Mon Mar  9 12:50:07 2009
@@ -145,7 +145,7 @@
       delivery_module = getattr(self.getPortalObject(), self.getDeliveryModule())
       getattr(delivery_module, delivery_module_before_building_script_id)()
 
-  def searchMovementList(self, applied_rule_uid=None,**kw):
+  def searchMovementList(self, *args, **kw):
     """
       Defines how to query all Simulation Movements which meet certain
       criteria (including the above path path definition).
@@ -154,6 +154,11 @@
       Then, call script simulation_select_method to restrict
       movement_list.
     """
+    searchMovementList = UnrestrictedMethod(self._searchMovementList)
+    return searchMovementList(*args, **kw)
+
+  def _searchMovementList(self, applied_rule_uid=None,**kw):
+    """This method is wrapped by UnrestrictedMethod."""
     from Products.ERP5Type.Document import newTempMovement
     movement_list = []
     for attribute, method in [('node_uid', 'getDestinationUid'),




More information about the Erp5-report mailing list