diff --git a/trytond/model/modelsql.py b/trytond/model/modelsql.py index 29780da74b..fda2d90a81 100644 --- a/trytond/model/modelsql.py +++ b/trytond/model/modelsql.py @@ -312,14 +312,6 @@ class ModelSQL(ModelStorage): values[field])) else: upd_todo.append(field) - if (isinstance(column, fields.Many2One) - and column.model_name == self._name - and column.left and column.right - and set((column.left, column.right)).isdisjoint(values)): - upd0 += ', "%s", "%s"' % (column.left, column.right) - upd1 += ', %s, %s' - upd2.extend([0, 0]) - if field in self._columns \ and hasattr(self._columns[field], 'selection') \ and self._columns[field].selection \ diff --git a/trytond/test/mptt.py b/trytond/test/mptt.py index 78cba0fb34..c9bc027521 100644 --- a/trytond/test/mptt.py +++ b/trytond/test/mptt.py @@ -30,4 +30,10 @@ class MPTT(ModelSQL, ModelView): def default_active(self): return True + def default_left(self): + return 0 + + def default_right(self): + return 0 + MPTT()