OCA reporting engine fork for dev and update.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
786 B

  1. # Copyright 2020 NextERP Romania SRL
  2. # Copyright 2021 Tecnativa - Víctor Martínez
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  4. from odoo import api, fields, models
  5. class ResPartner(models.Model):
  6. _inherit = "res.partner"
  7. base_comment_template_ids = fields.Many2many(
  8. comodel_name="base.comment.template",
  9. relation="base_comment_template_res_partner_rel",
  10. column1="res_partner_id",
  11. column2="base_comment_template_id",
  12. string="Comment Templates",
  13. help="Specific partner comments that can be included in reports",
  14. )
  15. @api.model
  16. def _commercial_fields(self):
  17. """Add comment templates to commercial fields"""
  18. return super()._commercial_fields() + ["base_comment_template_ids"]