From 0fc93fb1e40a88ab121e367714515f40c321c5ac Mon Sep 17 00:00:00 2001 From: Mohammed Shekha Date: Tue, 28 Dec 2021 13:00:12 +0000 Subject: [PATCH] [IMP] l10n_in: change fiscalyear_last_month to march With this commit: we are changing fiscalyear_last_month to March if chart template is Indian chart template as fiscal year ends in 31 March in India. task-2723849 closes odoo/odoo#81982 Signed-off-by: Josse Colpaert --- addons/l10n_in/models/chart_template.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/l10n_in/models/chart_template.py b/addons/l10n_in/models/chart_template.py index cb18bb758a1..0f7b9e7ab4f 100644 --- a/addons/l10n_in/models/chart_template.py +++ b/addons/l10n_in/models/chart_template.py @@ -17,6 +17,13 @@ class AccountChartTemplate(models.Model): journal['name'] = _('Tax Invoices') return res + def _load(self, company): + res = super(AccountChartTemplate, self)._load(company) + if self == self.env.ref("l10n_in.indian_chart_template_standard"): + company.write({'fiscalyear_last_month': '3'}) + return res + + class AccountTaxTemplate(models.Model): _inherit = 'account.tax.template'