diff options
| author | Adrian Torres <adt@odoo.com> | 2019-10-24 07:42:44 +0000 |
|---|---|---|
| committer | Adrian Torres <adt@odoo.com> | 2019-11-07 08:39:17 +0000 |
| commit | 3da477dfc5f98f092cda1ead73ea87372fac6bd2 (patch) | |
| tree | 93faec78fa6d7bad578b9462556f9da8049b5b2a /addons/sms | |
| parent | 2dccf4d6cd076ed768f5ec7acbf3c41ef3e06c2e (diff) | |
[FIX] *: adapt code to comply with new ondelete policy
The ondelete policy must be explicitly set for m2o fields whose inverse
is a reflection model (ir.*)
Diffstat (limited to 'addons/sms')
| -rw-r--r-- | addons/sms/models/sms_template.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/sms/models/sms_template.py b/addons/sms/models/sms_template.py index e1ba74d3bb1..cf2120c8a5e 100644 --- a/addons/sms/models/sms_template.py +++ b/addons/sms/models/sms_template.py @@ -20,7 +20,7 @@ class SMSTemplate(models.Model): model_id = fields.Many2one( 'ir.model', string='Applies to', required=True, domain=['&', ('is_mail_thread_sms', '=', True), ('transient', '=', False)], - help="The type of document this template can be used with") + help="The type of document this template can be used with", ondelete='cascade') model = fields.Char('Related Document Model', related='model_id.model', index=True, store=True, readonly=True) body = fields.Char('Body', translate=True, required=True) lang = fields.Char('Language', help="Use this field to either force a specific language (ISO code) or dynamically " |
