summaryrefslogtreecommitdiff
path: root/addons/web/static/tests/fields/basic_fields_tests.js
diff options
context:
space:
mode:
authorNans Lefebvre <len@odoo.com>2019-06-13 12:41:12 +0000
committerNans Lefebvre <len@odoo.com>2019-06-13 12:41:15 +0000
commitea064c81c92368951705cdc4325ed10b8add2cca (patch)
tree713cf8b792fd8c12fd694f75b99e2118ae8e34e7 /addons/web/static/tests/fields/basic_fields_tests.js
parent4c7f236fb547579ceceee307e5b96e36b6011cc8 (diff)
[FIX] website: fix access error at settings save
Let a database with company C1, C2, and a website W belonging to C1, used for both companies. Settings in C2 cannot be saved without setting a website. At settings load W is removed from C2 because it belongs to C1. So reset C2's website to W. This triggers a (useless) write of company_id (C1.id) on W. Then we have w.user_id.company_id.id != self.env.user.company_id.id, (C1 != C2). So if contacts are not shared, then accessing w.user_id.company_id would cause an access error because of record rules, preventing the save. As a result, settings are unusable for company C2. opw 2008887 closes odoo/odoo#34102 Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
Diffstat (limited to 'addons/web/static/tests/fields/basic_fields_tests.js')
0 files changed, 0 insertions, 0 deletions