Commit 30c811a0 authored by Łukasz Nowak's avatar Łukasz Nowak

- allow to have optional movement_list in arguments and support it

 - formatting
 - typo


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27611 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 92b291e8
...@@ -81,14 +81,14 @@ class TradeCondition(Path, Transformation, XMLMatrix): ...@@ -81,14 +81,14 @@ class TradeCondition(Path, Transformation, XMLMatrix):
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'updateAggregatedAmountList') 'updateAggregatedAmountList')
def updateAggregatedAmountList(self, context, **kw): def updateAggregatedAmountList(self, context, movement_list=None, rounding=None, **kw):
existing_movement_list = context.getMovementList() existing_movement_list = context.getMovementList()
aggregated_amount_list = self.getAggregatedAmountList(context=context, aggregated_amount_list = self.getAggregatedAmountList(context=context,
**kw) movement_list=movement_list, **kw)
modified_resource_list = [] modified_resource_list = []
normal_use_list = self.getPortalObject().portal_preferences\ normal_use_list = self.getPortalObject().portal_preferences\
.getPreferredNormalResourceUseCategoryList() .getPreferredNormalResourceUseCategoryList()
# check if the existing movements are in aggregated movments # check if the existing movements are in aggregated movements
movement_to_delete_list = [] movement_to_delete_list = []
movement_to_add_list = [] movement_to_add_list = []
for movement in existing_movement_list: for movement in existing_movement_list:
......
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