[FIX] models: allow constraint methods triggered by function fields

This commit is contained in:
Raphael Collet 2016-12-15 09:52:21 +01:00
parent 450f7df00d
commit 8e3e7874ad
1 changed files with 1 additions and 1 deletions

View File

@ -749,7 +749,7 @@ class BaseModel(object):
for name in func._constrains:
if name not in cls._fields:
_logger.warning("method %s.%s: @constrains parameter %r is not a field name", cls._name, attr, name)
if not cls._fields[name].store:
if not cls._fields[name].column:
_logger.warning("method %s.%s: @constrains parameter %r is not stored", cls._name, attr, name)
methods.append(func)