Commit a9bff219 authored by Sebastien Robin's avatar Sebastien Robin

make it working


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2116 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 608e31dd
......@@ -87,7 +87,7 @@ class InvoicingRule(Rule):
LOG('InvoicingRule.expand, my_context_movement.getSource()',0,my_context_movement.getSource())
LOG('InvoicingRule.expand, my_context_movement.getTargetSource()',0,my_context_movement.getTargetSource())
LOG('InvoicingRule.expand, my_context_movement.showDict()',0,my_context_movement.showDict())
LOG('InvoicingRule.expand, my_context_movement.getTargetSource',0,my_context_movement.getTargetSource)
LOG('InvoicingRule.expand, my_context_movement.getSource',0,my_context_movement.getSource())
if my_context_movement.getSource() is not None:
# We should only expand movements if they have a source
# otherwise, it creates infinite recursion
......@@ -95,16 +95,15 @@ class InvoicingRule(Rule):
# from an order which is deleted afterwards
# LOG('Sourcing', 0, str(my_context_movement.getDefaultResource()))
new_id = 'invoice_line'
transformation_source = getattr(aq_base(applied_rule), new_id, None)
if transformation_source is None:
if new_id in applied_rule.objectIds():
transformation_source = applied_rule[new_id]
else:
transformation_source = applied_rule.newContent(
type_name = delivery_line_type,
id = new_id
)
#resource = my_context_movement.getResource()
#if resource.find('operation/') >= 0:
# This is an operation - produce it
resource = my_context_movement.getResource()
transformation_source._edit(
target_quantity = my_context_movement.getTargetQuantity(),
target_efficiency = my_context_movement.getTargetEfficiency(),
......
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