From c0728dbfff126aaf12a04e49ea846653e2406350 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 13 Feb 2020 11:15:20 +0000 Subject: [PATCH] [FIX] base_automation: better name for relation of m2m Oversight of 92cf2474a2b6cbe13bb0d9f92f21a6f6b9c98a18 closes odoo/odoo#45328 X-original-commit: e4130099cca04ea0d98d9cab3a234e7d30530e44 Signed-off-by: Christophe Simonis --- addons/base_automation/models/base_automation.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/addons/base_automation/models/base_automation.py b/addons/base_automation/models/base_automation.py index 89ea93ae05f..3ac633948c0 100644 --- a/addons/base_automation/models/base_automation.py +++ b/addons/base_automation/models/base_automation.py @@ -68,7 +68,12 @@ class BaseAutomation(models.Model): help="If present, this condition must be satisfied before the update of the record.") filter_domain = fields.Char(string='Apply on', help="If present, this condition must be satisfied before executing the action rule.") last_run = fields.Datetime(readonly=True, copy=False) - on_change_field_ids = fields.Many2many('ir.model.fields', 'model_id', string="On Change Fields Trigger", help="Fields that trigger the onchange.") + on_change_field_ids = fields.Many2many( + "ir.model.fields", + relation="base_automation_onchange_fields_rel", + string="On Change Fields Trigger", + help="Fields that trigger the onchange.", + ) trigger_field_ids = fields.Many2many('ir.model.fields', string='Trigger Fields', help="The action will be triggered if and only if one of these fields is updated." "If empty, all fields are watched.")