From 33a7b33730ce2641a2190f690585cfda8ffa6084 Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Wed, 28 Apr 2010 14:58:00 +0530 Subject: [PATCH] [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 --- bin/osv/orm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 062c0bc6f3a..e57f9ce3d87 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -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)