ORM: deprecate check_recursion() in favour of _check_recursion()
bzr revid: p_christ@hol.gr-20101116150435-jfmjah8ookf11x3y
This commit is contained in:
@@ -4214,6 +4214,12 @@ class orm(orm_template):
|
||||
return cr.fetchone()[0] == len(ids)
|
||||
|
||||
def check_recursion(self, cr, uid, ids, parent=None):
|
||||
warnings.warn("You are using deprecated %s.check_recursion(). Please use the '_check_recursion()' instead!" % \
|
||||
self._name, DeprecationWarning, stacklevel=3)
|
||||
assert ' ' not in (parent or '')
|
||||
return self._check_recursion(cr, uid, ids, parent)
|
||||
|
||||
def _check_recursion(self, cr, uid, ids, parent=None):
|
||||
"""
|
||||
Verifies that there is no loop in a hierarchical structure of records,
|
||||
by following the parent relationship using the **parent** field until a loop
|
||||
|
||||
Reference in New Issue
Block a user