Commit e2804b0c authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

create two movements for payment rule.

XXX 'using different source' is not yet implemented.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32044 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9d8922c7
......@@ -105,9 +105,19 @@ class PaymentRuleMovementGenerator(MovementGeneratorMixin):
._getInputMovementAndPathTupleList(context):
kw = self._getPropertyAndCategoryList(input_movement, business_path)
kw.update({'order':None,'delivery':None})
quantity = kw.pop('quantity', 0)
# one for payable
simulation_movement = context.newContent(
portal_type=RuleMixin.movement_type,
temp_object=True,
quantity=-quantity,
**kw)
ret.append(simulation_movement)
# one for bank
simulation_movement = context.newContent(
portal_type=RuleMixin.movement_type,
temp_object=True,
quantity=quantity,
**kw)
ret.append(simulation_movement)
return ret
......
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