Use a business process with business links, needed by incoming change to...

Use a business process with business links, needed by incoming change to Simulation Movement to fetch future trade phase by business link

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45188 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b6ce802e
......@@ -185,8 +185,20 @@ class TestConversionInSimulation(AccountingTestCase):
self.portal.portal_workflow.doActionFor(account, 'validate_action')
def createBusinessProcess(self, resource=None):
self.business_process = business_process = \
self.portal.business_process_module.newContent()
module = self.portal.business_process_module
name = self.__class__.__name__ + '_' + self._testMethodName
self.business_process = business_process = module.newContent(
name,
reference=name,
)
# copy business links from the default erp5 Business Process
source = module['erp5_default_business_process']
business_link_id_list = [obj.getId()
for obj in source.objectValues()
if obj.getPortalType() == 'Business Link']
business_process.manage_pasteObjects(
source.manage_copyObjects(business_link_id_list)
)
trade_phase = self.getCategoryTool().trade_phase
kw = dict(portal_type='Trade Model Path',
trade_date='trade_phase/default/order')
......@@ -254,7 +266,7 @@ class TestConversionInSimulation(AccountingTestCase):
x_curr_ex_line.validate()
self.createBusinessProcess(currency)
transaction.commit()
self.tic()#execute transactio
self.tic()#execute transaction
client = self.portal.organisation_module.newContent(
portal_type='Organisation',
title='Client',
......
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