From: Harry (Open ERP) Date: Thu, 1 Apr 2010 13:37:42 +0000 (+0530) Subject: [FIX] orm: fixed problem on function field with store=True in create method X-Git-Tag: 6.0.0-rc1-server~1258 X-Git-Url: http://git.inspyration.org/?a=commitdiff_plain;h=ee854ffcf19de888170d8a9fc62b7664f8b82b3a;p=odoo%2Fodoo.git [FIX] orm: fixed problem on function field with store=True in create method bzr revid: hmo@tinyerp.com-20100401133742-lnq4fhjvishnl10i --- diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 6b78c18..430745d 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -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: