odoo/addons/marketing_campaign/models/mail_template.py

13 lines
414 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class MailTemplate(models.Model):
_inherit = "mail.template"
model_id = fields.Many2one('ir.model', default=lambda self: self.env.context.get('object_id', False))
# TODO: add constraint to prevent disabling / disapproving an email account used in a running campaign