Files
odoo_source/addons/l10n_ca/models/res_company.py
T
wan 2965012394 [FIX] l10n_ca: wrong predicate in xpath, missing fields in template preview
* `hasclass` should be used instead of `@class`
* fields added to a template should be present in `base.document.layout`
in order to be able to display the preview.

closes odoo/odoo#71249

Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-05-26 09:18:14 +00:00

17 lines
484 B
Python

# coding: utf-8
from odoo import models, fields
class ResCompany(models.Model):
_inherit = 'res.company'
l10n_ca_pst = fields.Char(related='partner_id.l10n_ca_pst', string='PST', store=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)