diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2019-12-27 16:34:37 +0000 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2020-01-15 16:19:03 +0000 |
| commit | b2392011900825bbc0d4d5e2456cd669595e2565 (patch) | |
| tree | dfdb7ffc2443b9fe22c5cedcdb4880f0745d05fe /addons/project/data/project_data.xml | |
| parent | 4a1dfb50b7cbcd08a46c6b37f4ad2b4c4bf37e6e (diff) | |
[FIX] *: avoid muting res.users().context_get return
Some code modify return of res.users().context_get, but this is a
cached method so this will unexpectedly affects totally unrelated code.
For example, changing the company with the company switcher could add
`allowed_company_ids` inside the cache, then it will be cached until the
server is restarted, even if we change company again inbetween.
Added test failed with:
"NotImplementedError: '__setitem__' not supported on frozendict"
on the line with `User = User.with_context(context)` where User already
contained `allowed_company_ids` in its context.
note:
in this forward-port, context_get is also changed to return frozendict
and prevent being able to have an unexpected issue by code that modify
context_get returns.
opw-2158340
closes #42465
closes odoo/odoo#42723
X-original-commit: 5d69885c1cd6921b3de00aae7e0ed6fff243ff95
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Diffstat (limited to 'addons/project/data/project_data.xml')
0 files changed, 0 insertions, 0 deletions
