[MERGE] fix for handling of domains for custom relationship fields

bzr revid: odo@openerp.com-20110329113947-ugkwb03xzf0k15hw
This commit is contained in:
Olivier Dony 2011-03-29 13:39:47 +02:00
commit fa508cc30c
2 changed files with 3 additions and 3 deletions

View File

@ -303,10 +303,10 @@ class ir_model_fields(osv.osv):
# static table of properties
model_props = [ # (our-name, fields.prop, set_fn)
('field_description', 'string', lambda a: a),
('field_description', 'string', str),
('required', 'required', bool),
('readonly', 'readonly', bool),
('domain', '_domain', lambda a: a),
('domain', '_domain', eval),
('size', 'size', int),
('on_delete', 'ondelete', str),
('translate', 'translate', bool),

View File

@ -2818,7 +2818,7 @@ class orm(orm_template):
'string': field['field_description'],
'required': bool(field['required']),
'readonly': bool(field['readonly']),
'domain': field['domain'] or None,
'domain': eval(field['domain']) if field['domain'] else None,
'size': field['size'],
'ondelete': field['on_delete'],
'translate': (field['translate']),