[FIX] orm: Do not prefetch custom fields.

When installing or updating a module, custom fields referring custom model
(many2one) cannot be read because custom model are not loaded at this stage
(they are only loaded after all modules because they can refer any model).
Not prefetching them avoid crash when computing stored function fields.

bzr revid: chs@openerp.com-20130626091332-231rqg5ouhnc3d2x
This commit is contained in:
Christophe Simonis 2013-06-26 11:13:32 +02:00
parent 9ad04d4e9b
commit c0115e7597
1 changed files with 1 additions and 0 deletions

View File

@ -1032,6 +1032,7 @@ class BaseModel(object):
'ondelete': field['on_delete'],
'translate': (field['translate']),
'manual': True,
'_prefetch': False,
#'select': int(field['select_level'])
}