From 22919bb1de3c44af9a21476d941cb651eee0f2d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20BEAU=20-=20http=3A//www=2Eakretion=2Ecom?= <> Date: Wed, 13 Oct 2010 00:52:59 +0530 Subject: [PATCH] [FIX]Speed improvement : Call of write() should go when there is vals bzr revid: jvo@tinyerp.com-20101012192259-w3jbfm9ocb2zkr5m --- bin/osv/orm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index bc2d1b03d86..7e3529f9b6f 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -3497,7 +3497,8 @@ class orm(orm_template): for val in updend: if self._inherit_fields[val][0] == table: v[val] = vals[val] - self.pool.get(table).write(cr, user, nids, v, context) + if v: + self.pool.get(table).write(cr, user, nids, v, context) self._validate(cr, user, ids, context)