[ADD] added comment in _validate() explaining why the context is not passed around when calling _constraints functions.
bzr revid: vmt@openerp.com-20121205082840-2ww34gbs7nl56952
This commit is contained in:
parent
aec7ff5024
commit
93ae934963
|
@ -1524,6 +1524,8 @@ class BaseModel(object):
|
|||
error_msgs = []
|
||||
for constraint in self._constraints:
|
||||
fun, msg, fields = constraint
|
||||
# We don't pass around the context here: validation code
|
||||
# must always yield the same results.
|
||||
if not fun(self, cr, uid, ids):
|
||||
# Check presence of __call__ directly instead of using
|
||||
# callable() because it will be deprecated as of Python 3.0
|
||||
|
|
Loading…
Reference in New Issue