Skip to content

Commit

Permalink
[FIX] models: allow constraint methods triggered by function fields
Browse files Browse the repository at this point in the history
  • Loading branch information
rco-odoo committed Dec 15, 2016
1 parent 450f7df commit 8e3e787
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openerp/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ def is_constraint(func):
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)

Expand Down

0 comments on commit 8e3e787

Please sign in to comment.