Commit dda2f660 authored by Jérome Perrin's avatar Jérome Perrin

don't hardcode wf_id


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20933 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d9e0b663
...@@ -906,7 +906,6 @@ class TestCRMMailSend(ERP5TypeTestCase): ...@@ -906,7 +906,6 @@ class TestCRMMailSend(ERP5TypeTestCase):
text_content='This is an advertisement mail.') text_content='This is an advertisement mail.')
first_event_id = event.getId() first_event_id = event.getId()
self.getWorkflowTool().doActionFor(event, 'respond_action', self.getWorkflowTool().doActionFor(event, 'respond_action',
wf_id='event_workflow',
respond_event_quotation = 1, respond_event_quotation = 1,
respond_event_portal_type = "Mail Message", respond_event_portal_type = "Mail Message",
respond_event_title = "Answer", respond_event_title = "Answer",
......
...@@ -179,8 +179,7 @@ class TestInvoice(TestPackingListMixin, ...@@ -179,8 +179,7 @@ class TestInvoice(TestPackingListMixin,
account = account_module.newContent(id=account_id) account = account_module.newContent(id=account_id)
account.setGap(account_gap) account.setGap(account_gap)
account.setAccountType(account_type) account.setAccountType(account_type)
portal.portal_workflow.doActionFor(account, portal.portal_workflow.doActionFor(account, 'validate_action')
'validate_action', wf_id='account_workflow')
invoice_rule = self.getPortal().portal_rules\ invoice_rule = self.getPortal().portal_rules\
.default_invoice_transaction_rule .default_invoice_transaction_rule
...@@ -225,8 +224,7 @@ class TestInvoice(TestPackingListMixin, ...@@ -225,8 +224,7 @@ class TestInvoice(TestPackingListMixin,
""" calls the workflow for the packing list """ """ calls the workflow for the packing list """
if packing_list is None: if packing_list is None:
packing_list = sequence.get('packing_list') packing_list = sequence.get('packing_list')
packing_list.portal_workflow.doActionFor(packing_list, packing_list.portal_workflow.doActionFor(packing_list, transition_name)
transition_name, wf_id='packing_list_workflow')
def stepSetReadyPackingList(self, sequence=None, sequence_list=None, **kw): def stepSetReadyPackingList(self, sequence=None, sequence_list=None, **kw):
""" set the Packing List as Ready. This must build the invoice. """ """ set the Packing List as Ready. This must build the invoice. """
...@@ -273,8 +271,7 @@ class TestInvoice(TestPackingListMixin, ...@@ -273,8 +271,7 @@ class TestInvoice(TestPackingListMixin,
""" calls the workflow for the invoice """ """ calls the workflow for the invoice """
if invoice is None: if invoice is None:
invoice = sequence.get('invoice') invoice = sequence.get('invoice')
invoice.portal_workflow.doActionFor(invoice, invoice.portal_workflow.doActionFor(invoice, transition_name)
transition_name, wf_id='accounting_workflow')
def stepStartInvoice(self, sequence=None, sequence_list=None, **kw): def stepStartInvoice(self, sequence=None, sequence_list=None, **kw):
self.modifyInvoiceState('start_action', sequence=sequence) self.modifyInvoiceState('start_action', sequence=sequence)
...@@ -623,10 +620,8 @@ class TestInvoice(TestPackingListMixin, ...@@ -623,10 +620,8 @@ class TestInvoice(TestPackingListMixin,
portal = self.getPortal() portal = self.getPortal()
invoice = sequence.get('invoice') invoice = sequence.get('invoice')
new_invoice = sequence.get('new_invoice') new_invoice = sequence.get('new_invoice')
portal.portal_workflow.doActionFor(invoice, portal.portal_workflow.doActionFor(invoice, 'start_action')
'start_action',wf_id='accounting_workflow') portal.portal_workflow.doActionFor(new_invoice, 'start_action')
portal.portal_workflow.doActionFor(new_invoice,
'start_action',wf_id='accounting_workflow')
def stepCheckTwoInvoicesTransactionLines(self,sequence=None, def stepCheckTwoInvoicesTransactionLines(self,sequence=None,
sequence_list=None, **kw): sequence_list=None, **kw):
...@@ -842,8 +837,7 @@ class TestInvoice(TestPackingListMixin, ...@@ -842,8 +837,7 @@ class TestInvoice(TestPackingListMixin,
""" """
invoice = sequence.get('invoice') invoice = sequence.get('invoice')
invoice.portal_workflow.doActionFor(invoice,'split_prevision_action', invoice.portal_workflow.doActionFor(invoice,'split_prevision_action',
wf_id='invoice_causality_workflow', start_date=self.datetime + start_date=self.datetime + 15, stop_date=self.datetime + 25)
15, stop_date=self.datetime + 25)
def stepAcceptDecisionInvoice(self, sequence=None, sequence_list=None, def stepAcceptDecisionInvoice(self, sequence=None, sequence_list=None,
**kw): **kw):
......
...@@ -236,7 +236,6 @@ class TestPackingListMixin(TestOrderMixin): ...@@ -236,7 +236,6 @@ class TestPackingListMixin(TestOrderMixin):
""" """
packing_list = sequence.get('packing_list') packing_list = sequence.get('packing_list')
packing_list.portal_workflow.doActionFor(packing_list,'split_prevision_action', packing_list.portal_workflow.doActionFor(packing_list,'split_prevision_action',
wf_id='packing_list_causality_workflow',
start_date=self.datetime + 15, start_date=self.datetime + 15,
stop_date=self.datetime + 25) stop_date=self.datetime + 25)
......
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