Commit 93da3d02 authored by Jérome Perrin's avatar Jérome Perrin

state name changed from emitted to new in transmission sheet workflow.

new test for fixing account type consistency with payable account



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10235 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d7b9c7bd
...@@ -159,9 +159,9 @@ class TestAccounting_l10n_M9(ERP5TypeTestCase): ...@@ -159,9 +159,9 @@ class TestAccounting_l10n_M9(ERP5TypeTestCase):
invoice.recursiveImmediateReindexObject() invoice.recursiveImmediateReindexObject()
self.getWorkflowTool().doActionFor( self.getWorkflowTool().doActionFor(
transmission_sheet, transmission_sheet,
'emit_action') 'emit_action') # XXX is this transition name good?
self.assertEquals(transmission_sheet.getValidationState(), self.assertEquals(transmission_sheet.getValidationState(),
'emitted') 'new')
def test_TransmissionSheetEmitRefusedIfNoInvoice(self): def test_TransmissionSheetEmitRefusedIfNoInvoice(self):
"""Transmission sheet cannot be emitted if it doesn't contain any invoice. """Transmission sheet cannot be emitted if it doesn't contain any invoice.
...@@ -218,6 +218,13 @@ class TestAccounting_l10n_M9(ERP5TypeTestCase): ...@@ -218,6 +218,13 @@ class TestAccounting_l10n_M9(ERP5TypeTestCase):
self.failUnless(account.getAccountType() in ('liability/payable', self.failUnless(account.getAccountType() in ('liability/payable',
'asset/receivable')) 'asset/receivable'))
def test_AccountTypeConstaintFixForPayable(self):
account = self._getAccount('payable_account',
gap='fr/m9/4/40',
account_type='equity')
self.assertEquals(1, len(account.checkConsistency(fixit=1)))
self.assertEquals('liability/payable', account.getAccountType())
if __name__ == '__main__': if __name__ == '__main__':
framework() framework()
else: else:
......
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