Commit 23fd800a authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

modify test_accept_quantity_divergence_on_invoice_with_started_packing_list...

modify test_accept_quantity_divergence_on_invoice_with_started_packing_list because changes on simulation movements will not backtrack with new simulation solvers.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34052 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 79b9515e
...@@ -3460,21 +3460,24 @@ class TestSaleInvoice(TestSaleInvoiceMixin, TestInvoice, ERP5TypeTestCase): ...@@ -3460,21 +3460,24 @@ class TestSaleInvoice(TestSaleInvoiceMixin, TestInvoice, ERP5TypeTestCase):
invoice_line.getDeliveryRelatedValue(portal_type='Simulation Movement' invoice_line.getDeliveryRelatedValue(portal_type='Simulation Movement'
).getQuantity()) ).getQuantity())
# the packing list is divergent, because it is not frozen if self.portal._getOb('portal_solvers', None) is not None:
self.assertEquals('diverged', packing_list.getCausalityState()) # With new simulation solvers, changes on simulation movements will
# not backtrack.
divergence_list = packing_list.getDivergenceList() pass
self.assertEquals(1, len(divergence_list)) else:
# With legacy simulation solvers, changes on simulation movements
divergence = divergence_list[0] # will backtrack if simulation movements are not frozen.
self.assertEquals('quantity', divergence.tested_property) # the packing list is divergent, because it is not frozen
self.assertEquals('diverged', packing_list.getCausalityState())
# if we adopt prevision on this packing list, both invoice and packing list divergence_list = packing_list.getDivergenceList()
# will be solved self.assertEquals(1, len(divergence_list))
self._adoptDivergenceOnPackingList(packing_list, divergence_list) divergence = divergence_list[0]
self.assertEquals('quantity', divergence.tested_property)
transaction.commit() # if we adopt prevision on this packing list, both invoice and
self.tic() # packing list will be solved
self._adoptDivergenceOnPackingList(packing_list, divergence_list)
transaction.commit()
self.tic()
self.assertEquals('solved', packing_list.getCausalityState()) self.assertEquals('solved', packing_list.getCausalityState())
self.assertEquals('solved', invoice.getCausalityState()) self.assertEquals('solved', invoice.getCausalityState())
......
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