Commit ec45d968 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

fix 'undefined name' errors.


git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/amount_generator@37041 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c013f816
...@@ -106,9 +106,8 @@ class TradeModelRuleMovementGenerator(MovementGeneratorMixin): ...@@ -106,9 +106,8 @@ class TradeModelRuleMovementGenerator(MovementGeneratorMixin):
if trade_model is None: if trade_model is None:
return result return result
context_movement = context.getParentValue() rule = self._applied_rule.getSpecialiseValue()
rule = context.getSpecialiseValue() for amount in simulation_movement.getAggregatedAmountList(
for amount in context_movement.getAggregatedAmountList(
# XXX add a 'trade_amount_generator' group type # XXX add a 'trade_amount_generator' group type
amount_generator_type_list=('Purchase Trade Condition', amount_generator_type_list=('Purchase Trade Condition',
'Sale Trade Condition', 'Sale Trade Condition',
...@@ -124,7 +123,7 @@ class TradeModelRuleMovementGenerator(MovementGeneratorMixin): ...@@ -124,7 +123,7 @@ class TradeModelRuleMovementGenerator(MovementGeneratorMixin):
business_path = business_path_list[0] business_path = business_path_list[0]
kw = self._getPropertyAndCategoryList(context_movement, business_path, kw = self._getPropertyAndCategoryList(simulation_movement, business_path,
rule) rule)
# rule specific # rule specific
...@@ -141,7 +140,7 @@ class TradeModelRuleMovementGenerator(MovementGeneratorMixin): ...@@ -141,7 +140,7 @@ class TradeModelRuleMovementGenerator(MovementGeneratorMixin):
kw['delivery'] = None # Where does this come from ??? XXX-JPS - Why not None ? kw['delivery'] = None # Where does this come from ??? XXX-JPS - Why not None ?
# XXX-JPS Way too many properties are copied # XXX-JPS Way too many properties are copied
simulation_movement = context.newContent( simulation_movement = self._applied_rule.newContent(
portal_type=RuleMixin.movement_type, portal_type=RuleMixin.movement_type,
temp_object=True, temp_object=True,
**kw) **kw)
......
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