[FIX]Speed improvement : Call of write() should go when there is vals

bzr revid: jvo@tinyerp.com-20101012192259-w3jbfm9ocb2zkr5m
This commit is contained in:
Sébastien BEAU - http://www.akretion.com 2010-10-13 00:52:59 +05:30 committed by Jay (OpenERP)
parent 3af1a322d4
commit 22919bb1de
1 changed files with 2 additions and 1 deletions

View File

@ -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)