From c5c5186ee26a4e7da95e1e183a03dea351f85073 Mon Sep 17 00:00:00 2001 From: ced <> Date: Thu, 9 Aug 2007 06:06:56 +0000 Subject: [PATCH] Now property are also browse record bzr revid: ced-8eb51832fdd367c1baeddb83a96cf069c25d1af8 --- bin/osv/orm.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 29a5d244b12..da4d1115de2 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -189,7 +189,11 @@ class browse_record(object): # self._cr.execute('SELECT id FROM '+obj._table+' where id = %d AND (company_id in ('+','.join(map(str,compids))+') or company_id is null)', (data[n],)) # if not self._cr.fetchall(): # raise except_orm('BrowseError', 'Object %s (id:%d) is linked to the object %s (id:%d) which is not in your company' %(self._table._description, self._id, obj._description, data[n])) - data[n] = browse_record(self._cr, self._uid, data[n], obj, self._cache, context=self._context, list_class=self._list_class) + if not f._classic_write: + ids2 = data[n][0] + else: + ids2 = data[n] + data[n] = browse_record(self._cr, self._uid, ids2, obj, self._cache, context=self._context, list_class=self._list_class) else: data[n] = browse_null() elif f._type in ('one2many', 'many2many') and len(data[n]):