summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorGoffin Simon <sig@odoo.com>2020-11-16 15:55:09 +0000
committerGoffin Simon <sig@odoo.com>2020-11-16 17:29:07 +0000
commitb3415d9dd0bcc1053e47b8a0082c772ca4a8220f (patch)
tree70ffc6362d9b1e7ba8e8bbe2dee98e58b91838a8 /addons
parentf5d0f4a1ebf406583889e9e04912d40c0693343e (diff)
[FIX] base_automation: traceback on updates
Steps to reproduce the bug: 1.Create an automated action with the following: - Model: Task (project.task) - Active: True - Trigger: On Update - Action To Do: Create Next Activity 2. Open or create a task in Project module 3. Edit 4. Change or set customer (partner_id) Bug: An error message was raised. opw:2376492 closes odoo/odoo#61800 Related: odoo/enterprise#14764 Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Diffstat (limited to 'addons')
-rw-r--r--addons/base_automation/models/base_automation.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/base_automation/models/base_automation.py b/addons/base_automation/models/base_automation.py
index be72b5ac41d..2fd82b39388 100644
--- a/addons/base_automation/models/base_automation.py
+++ b/addons/base_automation/models/base_automation.py
@@ -322,7 +322,7 @@ class BaseAutomation(models.Model):
actions = self.env['base.automation']._get_actions(self, ['on_write', 'on_create_or_write'])
if not (actions and self):
return write.origin(self, vals, **kw)
- records = self.with_env(actions.env)
+ records = self.with_env(actions.env).filtered('id')
# check preconditions on records
pre = {action: action._filter_pre(records) for action in actions}
# read old values before the update