[FIX] orm: fixed problem on function field with store=True in create method

bzr revid: hmo@tinyerp.com-20100401133742-lnq4fhjvishnl10i
This commit is contained in:
Harry (Open ERP)
2010-04-01 19:07:42 +05:30
parent e542e8adc7
commit ee854ffcf1
+3 -2
View File
@@ -3269,8 +3269,9 @@ class orm(orm_template):
upd0.append('"'+v+'"='+self._columns[v]._symbol_set[0])
upd1.append(self._columns[v]._symbol_set[1](value[v]))
upd1.append(id)
cr.execute('update "' + self._table + '" set ' + \
string.join(upd0, ',') + ' where id = %s', upd1)
if upd0 and upd1:
cr.execute('update "' + self._table + '" set ' + \
string.join(upd0, ',') + ' where id = %s', upd1)
else:
for f in val: