summaryrefslogtreecommitdiff
path: root/odoo/addons/test_new_api/security
diff options
context:
space:
mode:
authorRaphael Collet <rco@odoo.com>2020-05-05 08:54:53 +0000
committerRaphael Collet <rco@odoo.com>2020-05-06 19:25:17 +0000
commiteb08e2c22896334fc26aedb353a310421e42b89b (patch)
treeea10f34605c89bb507a0adc324335cb3090ce9df /odoo/addons/test_new_api/security
parent864e1ed61d3a19b4ebb19ba15c625c5d3079e3ba (diff)
[FIX] core: unexpected cache invalidation when updating one2many
When setting a many2one field, the corresponding one2many fields are updated in cache. When such a one2many field has a domain, the evaluation of the domain may require to fetch some fields from the database. If the `towrite` cache has not been updated yet, the many2one field is overridden by the database value. Fix by setting the `towrite` cache before updating inverse fields. closes odoo/odoo#50788 X-original-commit: c1ebfe05a66cfebc7ced36e25db5f6ff4bfb2d46 Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Diffstat (limited to 'odoo/addons/test_new_api/security')
-rw-r--r--odoo/addons/test_new_api/security/ir.model.access.csv2
1 files changed, 2 insertions, 0 deletions
diff --git a/odoo/addons/test_new_api/security/ir.model.access.csv b/odoo/addons/test_new_api/security/ir.model.access.csv
index 139a321489b..6063ecef49f 100644
--- a/odoo/addons/test_new_api/security/ir.model.access.csv
+++ b/odoo/addons/test_new_api/security/ir.model.access.csv
@@ -57,3 +57,5 @@ access_test_new_api_monetary_order_line,access_test_new_api_monetary_order_line,
access_test_new_api_model_selection_base,access_test_new_api_model_selection_base,model_test_new_api_model_selection_base,,1,1,1,1
access_test_new_api_model_selection_required,access_test_new_api_model_selection_required,model_test_new_api_model_selection_required,,1,1,1,1
access_test_new_api_model_selection_non_stored,access_test_new_api_model_selection_non_stored,model_test_new_api_model_selection_non_stored,,1,1,1,1
+access_test_new_api_move,access_test_new_api_move,model_test_new_api_move,,1,1,1,1
+access_test_new_api_move_line,access_test_new_api_move_line,model_test_new_api_move_line,,1,1,1,1