Update analytic tests for Universal Chart of Account

This commit is contained in:
Cédric Krier committed 2024-10-27 12:53:51 +01:00
1 parent 2464ef02aa
commit 0fbb9b43cd
2 files changed
+13 -12

No files matched your search

@@ -184,12 +184,7 @@ Prepare to balance non-deferral accounts::
>>> period_closing.start_date = fiscalyear.end_date
>>> period_closing.end_date = fiscalyear.end_date
>>> period_closing.save()
>>> equity, = AccountType.find([('name', '=', 'Equity')])
>>> account_pl = Account()
>>> account_pl.name = 'P&L'
>>> account_pl.type = equity
>>> account_pl.parent = revenue.parent
>>> account_pl.save()
>>> account_pl, = Account.find([('code', '=', '3.2.1')])
Balance non-deferral accounts::
+12 -6
View File
@@ -54,16 +54,20 @@ class AnalyticAccountTestCase(CompanyTestMixin, ModuleTestCase):
])
revenue, = Account.search([
('type.revenue', '=', True),
])
('closed', '=', False),
], limit=1)
receivable, = Account.search([
('type.receivable', '=', True),
])
('closed', '=', False),
], limit=1)
expense, = Account.search([
('type.expense', '=', True),
])
('closed', '=', False),
], limit=1)
payable, = Account.search([
('type.payable', '=', True),
])
('closed', '=', False),
], limit=1)
first_account_line = {
'account': revenue.id,
@@ -171,10 +175,12 @@ class AnalyticAccountTestCase(CompanyTestMixin, ModuleTestCase):
])
expense, = Account.search([
('type.expense', '=', True),
])
('closed', '=', False),
], limit=1)
payable, = Account.search([
('type.payable', '=', True),
])
('closed', '=', False),
], limit=1)
move = Move()
move.period = period