From 3871ae2c6c45b62d0ebc6952a9a89f7c762abd47 Mon Sep 17 00:00:00 2001 From: Damien Bouvy Date: Mon, 9 Oct 2023 13:15:44 +0200 Subject: [PATCH] [IMP] base_automation,base: support m2m operations in server actions Before this commit, server actions of the 'Update Record' type could only write on m2m fields entirely - meaning that there was no support for commands like adding or removing records from the set without writing it completely. This commit introduces this possibility, along with some UI changes to come from it regarding the display of such actions in automation rules. Task-3450200 Part-of: odoo/odoo#138804 --- .../views/base_automation_views.xml | 32 +++++++---- odoo/addons/base/models/ir_actions.py | 19 ++++++- odoo/addons/base/tests/test_ir_actions.py | 53 +++++++++++++++++++ odoo/addons/base/views/ir_actions_views.xml | 7 ++- 4 files changed, 98 insertions(+), 13 deletions(-) diff --git a/addons/base_automation/views/base_automation_views.xml b/addons/base_automation/views/base_automation_views.xml index 319bf9be61a..36441a34010 100644 --- a/addons/base_automation/views/base_automation_views.xml +++ b/addons/base_automation/views/base_automation_views.xml @@ -138,6 +138,8 @@ + + - to - - - - - " - - " - - + + by clearing it + + + by adding + + + by removing + + + by setting it to + + + to + as + + + + +