Commit ea4abfca authored by Łukasz Nowak's avatar Łukasz Nowak

- it is needed to set causality link to Business Process from Simulation...

 - it is needed to set causality link to Business Process from Simulation Movement, so revert partially 27727 (test) and fully 27690 (implementation)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27898 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 962d66a0
......@@ -98,6 +98,9 @@ class TradeModelRule(TransformationRule):
else:
movement_dict['start_date'] = movement.getStartDate()
movement_dict['stop_date'] = movement.getStopDate()
movement_dict['causality_value'] = business_path
return movement_dict
def _getStaticPropertyDict(self, context_movement):
......
......@@ -636,6 +636,11 @@ class TestBPMMixin(ERP5TypeTestCase):
trade_model_simulation_movement_discount_complex.getTotalPrice()
)
self.assertEqual(
business_path_discounting,
trade_model_simulation_movement_discount_complex.getCausalityValue()
)
self.assertEqual(
price_currency,
trade_model_simulation_movement_discount_complex \
......@@ -672,6 +677,11 @@ class TestBPMMixin(ERP5TypeTestCase):
trade_model_simulation_movement_tax_complex.getTotalPrice()
)
self.assertEqual(
business_path_taxing,
trade_model_simulation_movement_tax_complex.getCausalityValue()
)
self.assertEqual(
price_currency,
trade_model_simulation_movement_tax_complex.getPriceCurrencyValue()
......@@ -726,6 +736,11 @@ class TestBPMMixin(ERP5TypeTestCase):
trade_model_simulation_movement_discount_only.getTotalPrice()
)
self.assertEqual(
business_path_discounting,
trade_model_simulation_movement_discount_only.getCausalityValue()
)
self.assertEqual(
price_currency,
trade_model_simulation_movement_discount_only.getPriceCurrencyValue()
......@@ -755,6 +770,11 @@ class TestBPMMixin(ERP5TypeTestCase):
getTotalPrice() * self.default_tax_ratio,
trade_model_simulation_movement_tax_only.getTotalPrice())
self.assertEqual(
business_path_taxing,
trade_model_simulation_movement_tax_only.getCausalityValue()
)
self.assertEqual(
price_currency,
trade_model_simulation_movement_tax_only.getPriceCurrencyValue()
......@@ -796,6 +816,11 @@ class TestBPMMixin(ERP5TypeTestCase):
trade_model_simulation_movement.getTotalPrice()
)
self.assertEqual(
business_path,
trade_model_simulation_movement.getCausalityValue()
)
self.assertEqual(
price_currency,
trade_model_simulation_movement.getPriceCurrencyValue()
......
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