summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2019-06-24 12:08:17 +0000
committerXavier Morel <xmo@odoo.com>2019-06-24 12:29:41 +0000
commit5fd75da0e944952b2f8c9c4de19d84b3b78f6187 (patch)
tree1d4f51eb17eb2bee07c44739c4ea9aa74d1cd624 /addons/web/static/src/xml
parentab7ab7ebbb094c3fcce416a6ee26da6451280084 (diff)
[FIX] base: ir_rule don't not cache _compute_domain
Following the revamp / contextualisation of multi company, the list of allowed companies from the context is now used as part of the ir_rule caching key. Sadly that list is a list, and thus not hashable, meaning _compute_domain was not cached anymore. Sadlier, type errors would be silently ignored (just increasing the error counter of the cache stats). Fix both issues: * Store lists from the context as tuple. Technically could be a frozenset but that might not always be the case so it doesn't feel future-proof, a tuple might lead to slightly less hits but seems safer * Log a proper warning in case of an ormcache TypeError (non-hashable type used as cache key). It should never routinely happen. closes odoo/odoo#34330 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Diffstat (limited to 'addons/web/static/src/xml')
0 files changed, 0 insertions, 0 deletions