[ADD] saving m2o fields

bzr revid: xmo@openerp.com-20130923151633-61v7gw0llol4fvyo
This commit is contained in:
Xavier Morel
2013-09-23 17:16:33 +02:00
parent d71a200543
commit 68d9add6ce
+5 -1
View File
@@ -83,7 +83,11 @@ class view(osv.osv):
fields.date, fields.datetime)):
return el.text_content()
# TODO: fields.selection
# TODO: fields.many2one
elif issubclass(column_type, fields.many2one):
matches = self.pool[column._obj].name_search(
cr, uid, name=el.text_content().strip(), context=context)
# FIXME: more than one match, error reporting
return matches[0][0]
elif issubclass(column_type, fields.function):
# FIXME: special-case selection as in get_pg_type?
return self.convert_embedded_field(