Commit 1573f2b5 authored by Vincent Pelletier's avatar Vincent Pelletier

HQ "archives" (and does not "finish") the document when it originates from an agency.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18942 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c02e25b5
...@@ -357,6 +357,13 @@ class TestERP5BankingMutilatedBanknote(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -357,6 +357,13 @@ class TestERP5BankingMutilatedBanknote(TestERP5BankingMixin, ERP5TypeTestCase):
self.assertEqual(len(self.hq_mutilated_banknote.objectValues(portal_type="Exchanged Mutilated Banknote Line")), 0.0) self.assertEqual(len(self.hq_mutilated_banknote.objectValues(portal_type="Exchanged Mutilated Banknote Line")), 0.0)
self.assertRaises(ValidationFailed, self.workflow_tool.doActionFor, self.hq_mutilated_banknote, 'finish_action', wf_id='mutilated_banknote_workflow') self.assertRaises(ValidationFailed, self.workflow_tool.doActionFor, self.hq_mutilated_banknote, 'finish_action', wf_id='mutilated_banknote_workflow')
def stepTryArchiveHQWithNoLineDefined(self, sequence=None, sequence_list=None, **kw):
"""
Try to archive with no line defined on the document
"""
self.assertEqual(len(self.hq_mutilated_banknote.objectValues(portal_type="Exchanged Mutilated Banknote Line")), 0.0)
self.assertRaises(ValidationFailed, self.workflow_tool.doActionFor, self.hq_mutilated_banknote, 'archive_action', wf_id='mutilated_banknote_workflow')
def stepTryFinishWithNoAmountDefined(self, sequence=None, sequence_list=None, **kw): def stepTryFinishWithNoAmountDefined(self, sequence=None, sequence_list=None, **kw):
""" """
Try to confirm with no amount defined on the document Try to confirm with no amount defined on the document
...@@ -371,6 +378,13 @@ class TestERP5BankingMutilatedBanknote(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -371,6 +378,13 @@ class TestERP5BankingMutilatedBanknote(TestERP5BankingMixin, ERP5TypeTestCase):
self.assertEqual(self.hq_mutilated_banknote.getDestinationTotalAssetPrice(), 0.0) self.assertEqual(self.hq_mutilated_banknote.getDestinationTotalAssetPrice(), 0.0)
self.assertRaises(ValidationFailed, self.workflow_tool.doActionFor, self.hq_mutilated_banknote, 'finish_action', wf_id='mutilated_banknote_workflow') self.assertRaises(ValidationFailed, self.workflow_tool.doActionFor, self.hq_mutilated_banknote, 'finish_action', wf_id='mutilated_banknote_workflow')
def stepTryArchiveHQWithNoAmountDefined(self, sequence=None, sequence_list=None, **kw):
"""
Try to archive with no amount defined on the document
"""
self.assertEqual(self.hq_mutilated_banknote.getDestinationTotalAssetPrice(), 0.0)
self.assertRaises(ValidationFailed, self.workflow_tool.doActionFor, self.hq_mutilated_banknote, 'archive_action', wf_id='mutilated_banknote_workflow')
def stepFinishDocument(self, sequence=None, sequence_list=None, **kw): def stepFinishDocument(self, sequence=None, sequence_list=None, **kw):
""" """
Finish mutilated banknote operation (send to counter) Finish mutilated banknote operation (send to counter)
...@@ -766,7 +780,7 @@ class TestERP5BankingMutilatedBanknote(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -766,7 +780,7 @@ class TestERP5BankingMutilatedBanknote(TestERP5BankingMixin, ERP5TypeTestCase):
+ 'CreateHQIncomingLine Tic StopHQDocument Tic ' \ + 'CreateHQIncomingLine Tic StopHQDocument Tic ' \
+ 'CheckHQInventoryWithIncommingMaculatedBanknotes ' \ + 'CheckHQInventoryWithIncommingMaculatedBanknotes ' \
+ 'CheckHQMaculatedBanknoteInventory ' \ + 'CheckHQMaculatedBanknoteInventory ' \
+ 'TryFinishHQWithNoLineDefined CreateHQExchangedLine Tic TryFinishHQWithNoAmountDefined FinishHQDocument Tic ' \ + 'TryArchiveHQWithNoLineDefined CreateHQExchangedLine Tic TryArchiveHQWithNoAmountDefined ArchiveHQDocument Tic ' \
+ 'HQLogout ' \ + 'HQLogout ' \
+ 'CheckHQFinalInventoryWithPayBack '\ + 'CheckHQFinalInventoryWithPayBack '\
+ 'CreateExchangedLine Tic FinishDocument Tic ' \ + 'CreateExchangedLine Tic FinishDocument Tic ' \
......
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