Files
reporting-engine/base_comment_template/models/res_partner.py
Pedro M. Baeza 9b738976fe [FIX] base_comment_template: Make field truly company dependent
Previous field declaration was incorrect due to a typo, leading to non applying the
company dependent features.

Now everything is correct and the migration scripts care of moving data properly.
2021-01-26 16:00:00 +01:00

20 lines
521 B
Python

# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class ResPartner(models.Model):
_inherit = "res.partner"
property_comment_template_id = fields.Many2one(
comodel_name='base.comment.template',
string='Conditions template',
company_dependent=True,
)
@api.model
def _commercial_fields(self):
res = super(ResPartner, self)._commercial_fields()
res += ['property_comment_template_id']
return res