Don't validate Function fields without setter
It is a waste of resource to validate such Function fields because the value doesn't depend on data users enter.
This commit is contained in:
1 parent
d80ac90dda
commit
e8f50932e3
1 file changed
+3
@@ -973,6 +973,9 @@ class ModelStorage(Model):
|
||||
context.update(ctx_pref)
|
||||
records = self.browse(cursor, user, ids, context=context)
|
||||
for field_name, field in self._columns.iteritems():
|
||||
if isinstance(field, fields.Function) and \
|
||||
not field.setter:
|
||||
continue
|
||||
# validate domain
|
||||
if field._type in ('many2one', 'many2many', 'one2many') \
|
||||
and field.domain:
|
||||
|
||||
Reference in new issue
Block a user