Commit cd8399b6 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

since r.25757, searchMovementList() requires manager role if Simulation Movement is restricted.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25917 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a57b27f0
......@@ -98,7 +98,7 @@ class DeliveryBuilder(OrderBuilder):
"""
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 @@ class DeliveryBuilder(OrderBuilder):
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'
......
......@@ -145,7 +145,7 @@ class OrderBuilder(XMLObject, Amount, Predicate):
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 @@ class OrderBuilder(XMLObject, Amount, Predicate):
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'),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment