bzr revid: fp@tinyerp.com-20120820132501-7724jwavhzan3xyp
This commit is contained in:
Fabien Pinckaers 2012-08-20 15:25:01 +02:00
parent 1bd841d101
commit 64dc05afc6
1 changed files with 3 additions and 0 deletions

View File

@ -1585,6 +1585,9 @@ def field_to_dict(model, cr, user, field, context=None):
res['selection'] = field.selection(model, cr, user, context)
if res['type'] in ('one2many', 'many2many', 'many2one'):
res['relation'] = field._obj
dom = field._domain
if isinstance(field._domain, type(lambda: None)):
dom = field._domain(model)
res['domain'] = field._domain
res['context'] = field._context