projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5258427
)
[FIX] models: correct lazy loading of manual fields
author
Christophe Simonis
<chs@odoo.com>
Fri, 19 Sep 2014 14:51:29 +0000
(16:51 +0200)
committer
Christophe Simonis
<chs@odoo.com>
Fri, 19 Sep 2014 14:51:29 +0000
(16:51 +0200)
openerp/models.py
patch
|
blob
|
history
diff --git
a/openerp/models.py
b/openerp/models.py
index
6b909be
..
5423060
100644
(file)
--- a/
openerp/models.py
+++ b/
openerp/models.py
@@
-2998,7
+2998,9
@@
class BaseModel(object):
""" Setup the fields (dependency triggers, etc). """
for field in self._fields.itervalues():
if partial and field.manual and \
- field.relational and field.comodel_name not in self.pool:
+ field.relational and \
+ (field.comodel_name not in self.pool or \
+ field.inverse_name not in self.pool[field.comodel_name]._fields):
# do not set up manual fields that refer to unknown models
continue
field.setup(self.env)