Commit 520444f7 authored by Jérome Perrin's avatar Jérome Perrin

More guessing of the account_type based on gap


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10916 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d314ef06
...@@ -40,6 +40,10 @@ class M9AccountTypeConstraint(AccountTypeConstraint): ...@@ -40,6 +40,10 @@ class M9AccountTypeConstraint(AccountTypeConstraint):
('gap/fr/m9/4/41', ('asset/receivable', )), ('gap/fr/m9/4/41', ('asset/receivable', )),
('gap/fr/m9/4/42', ('liability/payable', )), ('gap/fr/m9/4/42', ('liability/payable', )),
('gap/fr/m9/4/43', ('liability/payable', )), ('gap/fr/m9/4/43', ('liability/payable', )),
('gap/fr/m9/4/47/471/4718', ('asset/receivable', )),
('gap/fr/m9/4/47/472/4721', ('liability/payable', )),
('gap/fr/m9/4/47/473/4731', ('asset/receivable', )),
('gap/fr/m9/4/47/473/4735', ('liability/payable', )),
('gap/fr/m9/4', ('liability/payable', 'asset/receivable')), ('gap/fr/m9/4', ('liability/payable', 'asset/receivable')),
('gap/fr/m9/5/59', ('asset', )), ('gap/fr/m9/5/59', ('asset', )),
('gap/fr/m9/5', ('asset/cash', )), ('gap/fr/m9/5', ('asset/cash', )),
......
31 32
\ No newline at end of file \ No newline at end of file
...@@ -224,7 +224,33 @@ class TestAccounting_l10n_M9(ERP5TypeTestCase): ...@@ -224,7 +224,33 @@ class TestAccounting_l10n_M9(ERP5TypeTestCase):
account_type='equity') account_type='equity')
self.assertEquals(1, len(account.checkConsistency(fixit=1))) self.assertEquals(1, len(account.checkConsistency(fixit=1)))
self.assertEquals('liability/payable', account.getAccountType()) self.assertEquals('liability/payable', account.getAccountType())
# Members of gap/fr/m9/4/47 are very specific
# for now, we do not fix 476 or 477
def test_AccountTypeConstaintFixFor4718(self):
account = self._getAccount('4718',
gap='fr/m9/4/47/471/4718', )
self.assertEquals(1, len(account.checkConsistency(fixit=1)))
self.assertEquals('asset/receivable', account.getAccountType())
def test_AccountTypeConstaintFixFor4721(self):
account = self._getAccount('4721',
gap='fr/m9/4/47/472/4721', )
self.assertEquals(1, len(account.checkConsistency(fixit=1)))
self.assertEquals('liability/payable', account.getAccountType())
def test_AccountTypeConstaintFixFor4731(self):
account = self._getAccount('4731',
gap='fr/m9/4/47/473/4731', )
self.assertEquals(1, len(account.checkConsistency(fixit=1)))
self.assertEquals('asset/receivable', account.getAccountType())
def test_AccountTypeConstaintFixFor4735(self):
account = self._getAccount('4735',
gap='fr/m9/4/47/473/4735', )
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