[FIX] _inherits : Relational field if on the view of child object,should not raise error

lp bug: https://launchpad.net/bugs/558528 fixed

bzr revid: jvo@tinyerp.com-20100428092800-itjau50duzsbhze9
This commit is contained in:
Jay (Open ERP)
2010-04-28 14:58:00 +05:30
parent 2a8f6d762c
commit 33a7b33730
+2 -2
View File
@@ -3281,8 +3281,8 @@ class orm(orm_template):
del vals[self._inherits[table]]
record_id = tocreate[table].pop('id', None)
if record_id is None:
if record_id is None or not record_id:
record_id = self.pool.get(table).create(cr, user, tocreate[table], context=context)
else:
self.pool.get(table).write(cr, user, [record_id], tocreate[table], context=context)