From 3491b7de34c9599f73bfb047e44b1abca4bb3c3f Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 14 Jul 2014 10:45:34 +0200 Subject: [PATCH] [REM] cache setting in _prefetch_field --- openerp/models.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/openerp/models.py b/openerp/models.py index f48aa5bc14a..7d19cc74e08 100644 --- a/openerp/models.py +++ b/openerp/models.py @@ -3123,12 +3123,11 @@ class BaseModel(object): # fetch records with read() assert self in records and field.name in fnames + result = [] try: result = records.read(list(fnames), load='_classic_write') - except AccessError as e: - # update cache with the exception - records._cache[field] = FailedValue(e) - result = [] + except AccessError: + pass # check the cache, and update it if necessary if field not in self._cache: