Commit cbe1dc42 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

we need to retrieve source and destination values for bank related simulation movements.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32093 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d7ce91c8
No related merge requests found
......@@ -37,6 +37,7 @@ from Products.ERP5.mixin.rule import RuleMixin
from Products.ERP5.mixin.movement_collection_updater import \
MovementCollectionUpdaterMixin
from Products.ERP5.mixin.movement_generator import MovementGeneratorMixin
from Products.ERP5.MovementCollectionDiff import _getPropertyAndCategoryList
class PaymentRule(RuleMixin, MovementCollectionUpdaterMixin, Predicate):
"""
......@@ -103,7 +104,10 @@ class PaymentRuleMovementGenerator(MovementGeneratorMixin):
ret = []
for input_movement, business_path in self \
._getInputMovementAndPathTupleList(context):
kw = self._getPropertyAndCategoryList(input_movement, business_path)
# Payment Rule does not work with Business Path
if business_path is None:
continue
kw = _getPropertyAndCategoryList(input_movement)
kw.update({'order':None,'delivery':None})
quantity = kw.pop('quantity', 0)
# one for payable
......@@ -114,6 +118,8 @@ class PaymentRuleMovementGenerator(MovementGeneratorMixin):
**kw)
ret.append(simulation_movement)
# one for bank
kw.update({'source':business_path.getSource(),
'destination':business_path.getDestination(),})
simulation_movement = context.newContent(
portal_type=RuleMixin.movement_type,
temp_object=True,
......
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