From c0531128601dde2da4ca749542fb808a13e2bd7b Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Wed, 25 Sep 2019 10:37:04 +0200 Subject: [PATCH] [10.0][FIX] base_exception: browse records were not updated As recordset are immutables, update() does not work on dict that contain such recordsets. --- base_exception/models/base_exception.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/base_exception/models/base_exception.py b/base_exception/models/base_exception.py index 3c577ee56..ec661484f 100644 --- a/base_exception/models/base_exception.py +++ b/base_exception/models/base_exception.py @@ -115,10 +115,12 @@ class BaseExceptionMethod(models.AbstractModel): # we expect to always work on the same model type rules_to_remove.setdefault( rule.id, main_records.browse() - ).update(to_remove) + ) + rules_to_remove[rule.id] |= to_remove rules_to_add.setdefault( rule.id, main_records.browse() - ).update(to_add) + ) + rules_to_add[rule.id] |= to_add if records_with_exception: all_exception_ids.append(rule.id) # Cumulate all the records to attach to the rule