Commit a76d437d authored by Sebastien Robin's avatar Sebastien Robin

creation of additional trade model path is now optional

because some tests of testTradeModelLine were failing
because of them

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44546 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 54252ce0
...@@ -79,7 +79,7 @@ class TestBPMMixin(ERP5TypeTestCase): ...@@ -79,7 +79,7 @@ class TestBPMMixin(ERP5TypeTestCase):
self.createCategoriesInCategory(category_tool.tax_share, 'AB') self.createCategoriesInCategory(category_tool.tax_share, 'AB')
@reindex @reindex
def createBusinessProcess(self, **kw): def createBusinessProcess(self, create_order_to_invoice_path=False, **kw):
module = self.portal.getDefaultModule( module = self.portal.getDefaultModule(
portal_type=self.business_process_portal_type,) portal_type=self.business_process_portal_type,)
business_process = module.newContent( business_process = module.newContent(
...@@ -87,6 +87,7 @@ class TestBPMMixin(ERP5TypeTestCase): ...@@ -87,6 +87,7 @@ class TestBPMMixin(ERP5TypeTestCase):
specialise=self.default_business_process) specialise=self.default_business_process)
self.business_process = business_process self.business_process = business_process
business_process._edit(**kw) business_process._edit(**kw)
if create_order_to_invoice_path:
self.createTradeModelPath(self.business_process, self.createTradeModelPath(self.business_process,
reference='order_path', reference='order_path',
trade_phase_value_list=('default/order',)) trade_phase_value_list=('default/order',))
...@@ -239,7 +240,8 @@ class TestBPMDummyDeliveryMovementMixin(TestBPMMixin): ...@@ -239,7 +240,8 @@ class TestBPMDummyDeliveryMovementMixin(TestBPMMixin):
def _createOrderedDeliveredInvoicedBusinessProcess(self): def _createOrderedDeliveredInvoicedBusinessProcess(self):
# simple business process preparation # simple business process preparation
business_process = self.createBusinessProcess() business_process = self.createBusinessProcess(
create_order_to_invoice_path=True)
category_tool = self.getCategoryTool() category_tool = self.getCategoryTool()
ordered = category_tool.trade_state.ordered ordered = category_tool.trade_state.ordered
delivered = category_tool.trade_state.delivered delivered = category_tool.trade_state.delivered
......
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