odoo/openerp
Christophe Simonis af9393d505 [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
b7865502e4
2015-07-24 14:01:09 +02:00
..
addons [FIX] orm: access error due to prefetch of indirectly referenced records. 2015-07-24 14:01:09 +02:00
cli [FIX] cli: Backport client command discovery optimization 2015-07-12 16:40:55 +02:00
conf [MERGE] openerp.pooler is deprecated. 2013-03-27 17:40:45 +01:00
modules [FIX] registry: recompute `pure_function_fields` after every setup 2015-05-06 09:11:53 +02:00
osv [FIX] osv: binary size already in human format 2015-07-07 19:17:43 +02:00
report [MERGE] forward port of branch 7.0 up to 99c87b6 2015-05-21 16:33:45 +02:00
service [MERGE] forward port of branch 7.0 up to 1c0bc7c 2015-06-30 12:47:27 +02:00
tests [IMP] running speed of some tests & new testcase type 2015-06-23 16:38:14 +02:00
tools [MERGE] forward port of branch saas-3 up to 505e308 2015-07-14 15:13:03 +02:00
workflow [IMP] workflow: add sequence for ordering workflow transitions (split/join mode especially for XOR) 2014-08-05 12:26:28 +02:00
PKG-INFO [REM] netrpc: KILL EVERYBODY 2013-02-21 13:18:25 +01:00
__init__.py [IMP] fields: turn field.digits and column.digits into dynamic properties 2015-03-23 14:36:15 +01:00
api.py [ADD] doc: new theme 2015-07-07 11:22:50 +02:00
exceptions.py [ADD] doc: new documentation, with training tutorials, and new scaffolding 2014-08-22 17:51:20 +02:00
fields.py [FIX] openerp: export None instead of False in raw_data mode 2015-07-09 11:49:04 +02:00
http.py [FIX] http: Compatibility with psutil 3.0 2015-06-16 08:59:44 +02:00
import_xml.rng [MERGE] ir-ui-view split active and show_customize 2014-08-31 16:56:44 +02:00
loglevels.py [REF] logging: removed pseudo log-level TEST. 2013-03-26 16:58:44 +01:00
models.py [FIX] orm: access error due to prefetch of indirectly referenced records. 2015-07-24 14:01:09 +02:00
netsvc.py [MERGE] forward port of branch 7.0 up to 1c0bc7c 2015-06-30 12:47:27 +02:00
pooler.py [IMP] registry: avoid every direct access registry.db, and rename attribute as registry._db 2014-04-09 15:35:15 +02:00
release.py [REL] Odoo 8.0 2014-09-18 12:11:18 +02:00
sql_db.py [FIX] Cursor.closed property 2015-05-11 16:24:33 +02:00