book: remove lef/right-fields
This commit is contained in:
parent
46e5fff805
commit
34f647b7c9
1 changed files with 3 additions and 12 deletions
15
book.py
15
book.py
|
@ -144,12 +144,9 @@ class Book(tree(separator='/'), Workflow, ModelSQL, ModelView):
|
||||||
state_string = state.translated('state')
|
state_string = state.translated('state')
|
||||||
|
|
||||||
parent = fields.Many2One(string="Parent",
|
parent = fields.Many2One(string="Parent",
|
||||||
model_name='cashbook.book', ondelete='RESTRICT',
|
model_name='cashbook.book', ondelete='RESTRICT')
|
||||||
left='left', right='right')
|
|
||||||
childs = fields.One2Many(string='Children', field='parent',
|
childs = fields.One2Many(string='Children', field='parent',
|
||||||
model_name='cashbook.book')
|
model_name='cashbook.book')
|
||||||
left = fields.Integer(string='Left', required=True, select=True)
|
|
||||||
right = fields.Integer(string='Right', required=True, select=True)
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def __register__(cls, module_name):
|
def __register__(cls, module_name):
|
||||||
|
@ -157,6 +154,8 @@ class Book(tree(separator='/'), Workflow, ModelSQL, ModelView):
|
||||||
|
|
||||||
table = cls.__table_handler__(module_name)
|
table = cls.__table_handler__(module_name)
|
||||||
table.drop_column('start_balance')
|
table.drop_column('start_balance')
|
||||||
|
table.drop_column('left')
|
||||||
|
table.drop_column('right')
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def __setup__(cls):
|
def __setup__(cls):
|
||||||
|
@ -189,14 +188,6 @@ class Book(tree(separator='/'), Workflow, ModelSQL, ModelView):
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def default_left():
|
|
||||||
return 0
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def default_right():
|
|
||||||
return 0
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def default_number_atcheck(cls):
|
def default_number_atcheck(cls):
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in a new issue