summaryrefslogtreecommitdiff
path: root/addons/analytic_user_function
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2015-07-24 14:01:09 +0200
committerChristophe Simonis <chs@odoo.com>2015-07-24 14:01:09 +0200
commitaf9393d5059a41bc3bf7042ffdfefa070b7506c5 (patch)
tree57914ca6c2b8eb48a5e19693c9b0d156ff417047 /addons/analytic_user_function
parentee145347a3c293a855d4fc77245e03a0beda741a (diff)
[FIX] orm: access error due to prefetch of indirectly referenced records.
The new-api record prefetching algorithm attempts to load data for all known records from the requested model (i.e. all IDs present in the environment cache), regardless of how indirectly/remotely they were referenced. An indirect parent record may therefore be prefetched along with its directly browsed children, possibly crossing company boundaries involuntarily. This patch implements a fallback mechanism when the prefetching failed due to what looks like an ACL restriction. The implementation of `_read_from_database` handle ACL directly and set an `AccessError` as cache value for restricted records. If a model (like `mail.message`) overwrites `read` to implements its own ACL checks and raises an `AccessError` before calling `super()` (which will then call `_read_from_database`), the cache will be not fill, leading to an unexpected exception. If this commit messae looks familiar to you, that's simply because this is the new-api counterpart of b7865502e49be27aa1c72adb0a49676dc7c6b747
Diffstat (limited to 'addons/analytic_user_function')
0 files changed, 0 insertions, 0 deletions