odoo/ext/3rd-party-addons/invoice_comment_template/models/res_partner.py

21 lines
539 B
Python

# -*- coding: utf-8 -*-
# Copyright 2018 Tecnativa - Vicent Cubells
# 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"
comment_template_id = fields.Many2one(
comodel_name='base.comment.template',
string='Conditions template',
)
@api.model
def _commercial_fields(self):
res = super(ResPartner, self)._commercial_fields()
res += ['comment_template_id']
return res