[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:
+2
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user