Commit afade282 authored by Alexandre Boeglin's avatar Alexandre Boeglin

Fixed behaviour, and removed useless commented lines.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2204 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 45b2bfd8
......@@ -90,9 +90,6 @@ class InvoiceTransactionRule(Rule, XMLMatrix):
# First, we need the region
my_order = applied_rule.getRootAppliedRule().getCausalityValue()
#my_invoice_line = my_invoice_line_simulation.getDeliveryValue()
#my_invoice = my_invoice_line.getParent()
#my_destination = my_invoice.getDestinationValue() # maybe DestinationSection instead of Destination
my_destination = my_order.getDestinationValue() # maybe DestinationSection instead of Destination
my_destination_address = my_destination.get('default_address')
if my_destination_address is None :
......@@ -128,16 +125,15 @@ class InvoiceTransactionRule(Rule, XMLMatrix):
else :
my_cell_transaction_id_list = []
if my_cell is not None : # else, we do nothing
# check each contained movement and delete
# those that we don't need
for movement in applied_rule.objectValues():
if movement.getId() not in my_cell_transaction_id_list :
movement.flushActivity(invoke=0)
applied_rule.deleteContent(movement.getId())
# Add every movement from the Matrix to the Simulation
if my_cell is not None :
for transaction_line in my_cell.objectValues() :
if transaction_line.getId() in applied_rule.objectIds() :
simulation_movement = applied_rule[transaction_line.getId()]
......
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