Commit 96ade857 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

calculate quantity, start_date and stop_date based on business process.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32155 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5c27486c
......@@ -108,8 +108,17 @@ class PaymentRuleMovementGenerator(MovementGeneratorMixin):
if business_path is None:
continue
kw = _getPropertyAndCategoryList(input_movement)
kw.update({'order':None,'delivery':None})
kw.update({'order':None, 'delivery':None})
quantity = kw.pop('quantity', 0)
efficiency = business_path.getEfficiency()
if efficiency:
quantity *= efficiency
start_date = business_path.getExpectedStartDate(input_movement)
if start_date is not None:
kw.update({'start_date':start_date})
stop_date = business_path.getExpectedStopDate(input_movement)
if stop_date is not None:
kw.update({'stop_date':stop_date})
# one for payable
simulation_movement = context.newContent(
portal_type=RuleMixin.movement_type,
......
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