diff --git a/category.py b/category.py index 2d73748..95e9858 100644 --- a/category.py +++ b/category.py @@ -39,16 +39,16 @@ class Category(tree(separator='/'), ModelSQL, ModelView): company = fields.Many2One(string='Company', model_name='company.company', required=True, ondelete="RESTRICT") parent = fields.Many2One(string="Parent", - model_name='cashbook.category', ondelete='RESTRICT', - left='left', right='right') + model_name='cashbook.category', ondelete='RESTRICT') childs = fields.One2Many(string='Children', field='parent', model_name='cashbook.category') - left = fields.Integer(string='Left', required=True, select=True) - right = fields.Integer(string='Right', required=True, select=True) @classmethod def __register__(cls, module_name): super(Category, cls).__register__(module_name) + table = cls.__table_handler__(module_name) + table.drop_column('left') + table.drop_column('right') cls.migrate_sequence(module_name) @classmethod @@ -83,14 +83,6 @@ class Category(tree(separator='/'), ModelSQL, ModelView): def default_company(): return Transaction().context.get('company') or None - @staticmethod - def default_left(): - return 0 - - @staticmethod - def default_right(): - return 0 - @staticmethod def order_rec_name(tables): """ order by pos diff --git a/locale/de.po b/locale/de.po index 6413c85..5bf26cc 100644 --- a/locale/de.po +++ b/locale/de.po @@ -578,14 +578,6 @@ msgctxt "field:cashbook.book,childs:" msgid "Children" msgstr "Untergeordnet" -msgctxt "field:cashbook.book,left:" -msgid "Left" -msgstr "Links" - -msgctxt "field:cashbook.book,right:" -msgid "Right" -msgstr "Rechts" - msgctxt "field:cashbook.book,balance_ref:" msgid "Balance (Ref.)" msgstr "Saldo (Ref.)" @@ -1070,14 +1062,6 @@ msgctxt "field:cashbook.category,childs:" msgid "Children" msgstr "Untergeordnet" -msgctxt "field:cashbook.category,left:" -msgid "Left" -msgstr "Links" - -msgctxt "field:cashbook.category,right:" -msgid "Right" -msgstr "Rechts" - msgctxt "field:cashbook.category,cattype:" msgid "Type" msgstr "Typ" diff --git a/locale/en.po b/locale/en.po index d83e5c4..8c5b79e 100644 --- a/locale/en.po +++ b/locale/en.po @@ -542,14 +542,6 @@ msgctxt "field:cashbook.book,childs:" msgid "Children" msgstr "Children" -msgctxt "field:cashbook.book,left:" -msgid "Left" -msgstr "Left" - -msgctxt "field:cashbook.book,right:" -msgid "Right" -msgstr "Right" - msgctxt "field:cashbook.book,balance_ref:" msgid "Balance (Ref.)" msgstr "Balance (Ref.)" @@ -1018,14 +1010,6 @@ msgctxt "field:cashbook.category,childs:" msgid "Children" msgstr "Children" -msgctxt "field:cashbook.category,left:" -msgid "Left" -msgstr "Left" - -msgctxt "field:cashbook.category,right:" -msgid "Right" -msgstr "Right" - msgctxt "field:cashbook.category,cattype:" msgid "Type" msgstr "Type"