Add check_recursion on location for issue546

This commit is contained in:
Cédric Krier
2008-11-13 16:11:17 +01:00
parent 435b02db79
commit 552f40a466
+6
View File
@@ -64,6 +64,12 @@ class Location(OSV):
def __init__(self):
super(Location, self).__init__()
self._order.insert(0, ('name', 'ASC'))
self._constraints += [
('check_recursion', 'recursive_locations'),
]
self._error_messages.update({
'recursive_locations': 'You can not create recursive locations!',
})
def default_active(self, cursor, user, context=None):
return True