summaryrefslogtreecommitdiff
path: root/odoo/addons/test_new_api/security
diff options
context:
space:
mode:
authorRaphael Collet <rco@odoo.com>2020-09-17 12:22:22 +0000
committerRaphael Collet <rco@odoo.com>2020-09-21 12:40:19 +0000
commitaebe9a76c9b35e84eda1f46bec3ef6da152b1539 (patch)
tree43f10cb1fecc98e041f455b6fbc7c0b9e8ca030a /odoo/addons/test_new_api/security
parentdc591641f3bf8dee50f172134ffd686edc571bd3 (diff)
[FIX] core: always evaluate field.depends upon setup
This is necessary when a field's dependencies are given by a callable. This functionality was broken with the support for an explicit parameter `depends` in the fields' definition, because the implementation could not distinguish between the field parameter `depends` and the `depends` evaluated from compute functions. The fix consists in storing the field parameter `depends` into `field._depends`, and the result of the setup into `field.depends`. closes odoo/odoo#58127 X-original-commit: d4d7925d69c9a37f099ddd3a8929004f17e162eb 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.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 37b088db27e..466b014f213 100644
--- a/odoo/addons/test_new_api/security/ir.model.access.csv
+++ b/odoo/addons/test_new_api/security/ir.model.access.csv
@@ -26,6 +26,7 @@ access_test_new_api_cascade,access_test_new_api_cascade,model_test_new_api_casca
access_test_new_api_compute_readwrite,access_test_new_api_compute_readwrite,model_test_new_api_compute_readwrite,,1,1,1,1
access_test_new_api_compute_onchange,access_test_new_api_compute_onchange,model_test_new_api_compute_onchange,,1,1,1,1
access_test_new_api_compute_onchange_line,access_test_new_api_compute_onchange_line,model_test_new_api_compute_onchange_line,,1,1,1,1
+access_test_new_api_compute_dynamic_depends,access_test_new_api_compute_dynamic_depends,model_test_new_api_compute_dynamic_depends,,1,1,1,1
access_test_new_api_compute_unassigned,access_test_new_api_compute_unassigned,model_test_new_api_compute_unassigned,,1,1,1,1
access_test_new_api_binary_svg,access_test_new_api_binary_svg,model_test_new_api_binary_svg,,1,1,1,1
access_test_new_api_monetary_base,access_test_new_api_monetary_base,model_test_new_api_monetary_base,,1,1,1,1