Commit 1f4566ff authored by Łukasz Nowak's avatar Łukasz Nowak

Check that causality is correctly updated on invoice.

parent 797d5a12
......@@ -147,6 +147,11 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
# invoice shall be solved
self.assertEqual('solved', setup_invoice_line_list[0].getCausalityState())
# invoice shall have causality of one packing list
self.assertEqual(
[setup_delivery_line_list[0].getParentValue().getUid()],
setup_invoice_line_list[0].getParentValue().getCausalityUidList())
sequence.edit(
subscription_delivery_uid_list=[q.getParentValue().getUid() for q in \
subscription_delivery_line_list]
......@@ -233,6 +238,13 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
# invoice shall be solved
self.assertEqual('solved', setup_invoice_line_list[0].getCausalityState())
# invoice shall have causality of two packing lists
self.assertEqual(
sorted([setup_delivery_line_list[0].getParentValue().getUid()] +
[q.getParentValue().getUid() for q in subscription_delivery_line_list if q.getSimulationState() == 'stopped']),
sorted(setup_invoice_line_list[0].getParentValue().getCausalityUidList()))
def test_OpenOrder_sale_packing_list(self):
"""
Check that sale_packing_list is generated properly from simulation
......
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