Reviewers: tryton-dev_googlegroups.com,


Please review this at http://codereview.tryton.org/1048002/

Affected files:
  M trytond/model/modelstorage.py


Index: trytond/model/modelstorage.py
===================================================================
--- a/trytond/model/modelstorage.py
+++ b/trytond/model/modelstorage.py
@@ -817,17 +817,17 @@ class ModelStorage(Model):
     @classmethod
def check_recursion(cls, records, parent='parent', rec_name='rec_name'):
         '''
         Function that checks if there is no recursion in the tree
         composed with parent as parent field name.
         '''
         parent_type = cls._fields[parent]._type

-        if parent_type not in ('many2one', 'many2many'):
+        if parent_type not in ('many2one', 'many2many', 'one2one'):
             raise Exception(
                 'Unsupported field type "%s" for field "%s" on "%s"'
                 % (parent_type, parent, cls.__name__))

         visited = set()

         for record in records:
             walked = set()


Reply via email to