summaryrefslogtreecommitdiff
path: root/odoo/addons/test_new_api/security
diff options
context:
space:
mode:
authorYannick Tivisse <yti@odoo.com>2020-01-13 11:52:13 +0000
committerYannick Tivisse <yti@odoo.com>2020-01-14 08:26:05 +0000
commit472ac63f1f115cb632b1c1c57c9fb22d15af9caa (patch)
tree4121a6b1ed1a82cfaf0f27462b93425f26271f53 /odoo/addons/test_new_api/security
parentd75859691135b1938e59893ea27a623b77405763 (diff)
[FIX] models.py: Fix check_company mechanism
Purpose ======= If check company is set on a field and if the user has no access right to the field value (example: address_id on an expense sheet could be set to a private res.partner, on an onchange method when setting the employee), then the check_company mechanism will raise an AccessError when trying the validate the companies on the different records. Specification ============= As we only wish to validate the new record values and not the access rights, the validation could be done as a superuser to avoid unecessary errors. closes odoo/odoo#43240 Taskid: 2170006 X-original-commit: 37a9b6c63dcbc268013fbe1a890cf9390eb8e223 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'odoo/addons/test_new_api/security')
-rw-r--r--odoo/addons/test_new_api/security/ir.model.access.csv1
1 files changed, 1 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 1cefc74a26e..5a4f8ce3239 100644
--- a/odoo/addons/test_new_api/security/ir.model.access.csv
+++ b/odoo/addons/test_new_api/security/ir.model.access.csv
@@ -47,3 +47,4 @@ access_test_new_api_inverse_m2o_ref,access_test_new_api_inverse_m2o_ref,model_te
access_test_new_api_model_binary,access_test_new_api_model_binary,model_test_new_api_model_binary,,1,1,1,1
access_test_new_api_model_child_m2o,access_test_new_api_model_child_m2o,model_test_new_api_model_child_m2o,,1,1,1,1
access_test_new_api_model_parent_m2o,access_test_new_api_model_parent_m2o,model_test_new_api_model_parent_m2o,,1,1,1,1
+access_test_new_api_model_private_address_onchange,access_test_new_api_model_private_address_onchange,model_test_new_api_model_private_address_onchange,base.group_user,1,1,1,1