Files
odoo_source/addons/l10n_eg/models/account_chart_template.py
T
akr a38d2f6ab7 [ADD] l10n_eg: add chart of accounts, taxes, tax groups, tax reports, and fiscal postions for Egypt
closes odoo/odoo#85423

X-original-commit: 2d9021c8bc43fac18a1d88f9aef74baa4bc0312d
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-02-28 08:26:51 +00:00

18 lines
847 B
Python

from odoo import models
class AccountChartTemplate(models.Model):
_inherit = 'account.chart.template'
def _prepare_all_journals(self, acc_template_ref, company, journals_dict=None):
""" If EGYPT chart, we add 2 new journals TA and IFRS"""
if self == self.env.ref('l10n_eg.egypt_chart_template_standard'):
if not journals_dict:
journals_dict = []
journals_dict.extend(
[{"name": "Tax Adjustments", "company_id": company.id, "code": "TA", "type": "general", "sequence": 1,
"favorite": True},
{"name": "IFRS 16", "company_id": company.id, "code": "IFRS", "type": "general", "favorite": True,
"sequence": 10}])
return super()._prepare_all_journals(acc_template_ref, company, journals_dict=journals_dict)