diff --git a/book.py b/book.py index 3493698..cb949af 100644 --- a/book.py +++ b/book.py @@ -144,12 +144,9 @@ class Book(tree(separator='/'), Workflow, ModelSQL, ModelView): state_string = state.translated('state') parent = fields.Many2One(string="Parent", - model_name='cashbook.book', ondelete='RESTRICT', - left='left', right='right') + model_name='cashbook.book', ondelete='RESTRICT') childs = fields.One2Many(string='Children', field='parent', model_name='cashbook.book') - left = fields.Integer(string='Left', required=True, select=True) - right = fields.Integer(string='Right', required=True, select=True) @classmethod def __register__(cls, module_name): @@ -157,6 +154,8 @@ class Book(tree(separator='/'), Workflow, ModelSQL, ModelView): table = cls.__table_handler__(module_name) table.drop_column('start_balance') + table.drop_column('left') + table.drop_column('right') @classmethod 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 def default_number_atcheck(cls): return True