From 1453b42fa436a15c4cd200317863f1a18d67aa44 Mon Sep 17 00:00:00 2001 From: "Julien Alardot (jual)" Date: Thu, 3 Aug 2023 09:13:07 +0000 Subject: [PATCH] [FIX] l10n_ca: fix document layout override During the refactor of the module the override of base.document.layout was removed by mistake, This is needed to add the PST number to the template related commit: fd2c6dce8e5bee5ac526e7f3edeb398a992f84b1 runbot build errors: 23816, 23817, 23800, 23801, 23802, 23803, 23804, 23829 closes odoo/odoo#130790 X-original-commit: 32ab5d9b2591a288606f77779d479384bb3b2599 Signed-off-by: Brice Bartoletti (bib) --- addons/l10n_ca/models/res_company.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/l10n_ca/models/res_company.py b/addons/l10n_ca/models/res_company.py index 512ba1456eb..89b34f6e35d 100644 --- a/addons/l10n_ca/models/res_company.py +++ b/addons/l10n_ca/models/res_company.py @@ -5,3 +5,10 @@ class ResCompany(models.Model): _inherit = 'res.company' l10n_ca_pst = fields.Char(related='partner_id.l10n_ca_pst', string='PST Number', store=False, readonly=False) + + +class BaseDocumentLayout(models.TransientModel): + _inherit = 'base.document.layout' + + l10n_ca_pst = fields.Char(related='company_id.l10n_ca_pst', readonly=True) + account_fiscal_country_id = fields.Many2one(related="company_id.account_fiscal_country_id", readonly=True)