diff options
Diffstat (limited to 'odoo/models.py')
| -rw-r--r-- | odoo/models.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/odoo/models.py b/odoo/models.py index 00ac1121e7c..80cd18e3be4 100644 --- a/odoo/models.py +++ b/odoo/models.py @@ -62,6 +62,7 @@ from .tools.misc import CountingStream, clean_context, DEFAULT_SERVER_DATETIME_F from .tools.translate import _ from .tools import date_utils from .tools import populate +from .tools.lru import LRU _logger = logging.getLogger(__name__) _schema = logging.getLogger(__name__ + '.schema') @@ -1077,7 +1078,7 @@ class BaseModel(MetaModel('DummyModel', (object,), {'_register': False})): # make 'flush' available to the methods below, in the case where XMLID # resolution fails, for instance - flush_self = self.with_context(import_flush=flush) + flush_self = self.with_context(import_flush=flush, import_cache=LRU(1024)) # TODO: break load's API instead of smuggling via context? limit = self._context.get('_import_limit') |
