Commit c7db24ed authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

path rule document to _getPropertyAndCategoryList() to avoid needless calculations.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34530 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 47229113
......@@ -101,9 +101,11 @@ class DeliveryRuleMovementGenerator(MovementGeneratorMixin):
Input movement list comes from the parent
"""
ret = []
rule = context.getSpecialiseValue()
for input_movement, business_path in self \
._getInputMovementAndPathTupleList(context):
kw = self._getPropertyAndCategoryList(input_movement, business_path)
kw = self._getPropertyAndCategoryList(input_movement, business_path,
rule)
kw.update({'order':None,'delivery':None})
simulation_movement = context.newContent(
portal_type=RuleMixin.movement_type,
......
......@@ -101,9 +101,11 @@ class InvoicingRuleMovementGenerator(MovementGeneratorMixin):
i.e. business paths are not taken into account.
"""
ret = []
rule = context.getSpecialiseValue()
for input_movement, business_path in self \
._getInputMovementAndPathTupleList(context):
kw = self._getPropertyAndCategoryList(input_movement, business_path)
kw = self._getPropertyAndCategoryList(input_movement, business_path,
rule)
kw.update({'order':None,'delivery':None})
simulation_movement = context.newContent(
portal_type=RuleMixin.movement_type,
......
......@@ -105,6 +105,7 @@ class TradeModelRuleMovementGenerator(MovementGeneratorMixin):
return movement_list
context_movement = context.getParentValue()
rule = context.getSpecialiseValue()
for amount in trade_condition.getAggregatedAmountList(context_movement):
# business path specific
business_path_list = business_process.getPathValueList(
......@@ -117,7 +118,8 @@ class TradeModelRuleMovementGenerator(MovementGeneratorMixin):
business_path = business_path_list[0]
kw = self._getPropertyAndCategoryList(context_movement, business_path)
kw = self._getPropertyAndCategoryList(context_movement, business_path,
rule)
# rule specific
kw['price'] = amount.getPrice() or amount.getEfficiency()
......
80
\ No newline at end of file
81
\ No newline at end of file
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