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,19 +3460,22 @@ class TestSaleInvoice(TestSaleInvoiceMixin, TestInvoice, ERP5TypeTestCase): ...@@ -3460,19 +3460,22 @@ class TestSaleInvoice(TestSaleInvoiceMixin, TestInvoice, ERP5TypeTestCase):
invoice_line.getDeliveryRelatedValue(portal_type='Simulation Movement' invoice_line.getDeliveryRelatedValue(portal_type='Simulation Movement'
).getQuantity()) ).getQuantity())
if self.portal._getOb('portal_solvers', None) is not None:
# With new simulation solvers, changes on simulation movements will
# not backtrack.
pass
else:
# With legacy simulation solvers, changes on simulation movements
# will backtrack if simulation movements are not frozen.
# the packing list is divergent, because it is not frozen # the packing list is divergent, because it is not frozen
self.assertEquals('diverged', packing_list.getCausalityState()) self.assertEquals('diverged', packing_list.getCausalityState())
divergence_list = packing_list.getDivergenceList() divergence_list = packing_list.getDivergenceList()
self.assertEquals(1, len(divergence_list)) self.assertEquals(1, len(divergence_list))
divergence = divergence_list[0] divergence = divergence_list[0]
self.assertEquals('quantity', divergence.tested_property) self.assertEquals('quantity', divergence.tested_property)
# if we adopt prevision on this packing list, both invoice and
# if we adopt prevision on this packing list, both invoice and packing list # packing list will be solved
# will be solved
self._adoptDivergenceOnPackingList(packing_list, divergence_list) self._adoptDivergenceOnPackingList(packing_list, divergence_list)
transaction.commit() transaction.commit()
self.tic() self.tic()
self.assertEquals('solved', packing_list.getCausalityState()) self.assertEquals('solved', packing_list.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