Remove hack for MPTT default values, left/right must have a default to 0
review315001
This commit is contained in:
1 parent
ee3be37a36
commit
f90818931c
2 files changed
+6
-8
No files matched your search
@@ -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 \
|
||||
|
||||
@@ -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()
|
||||
Reference in new issue
Block a user