remove left/right from category
This commit is contained in:
parent
2d6f034a17
commit
610532f6a5
3 changed files with 4 additions and 44 deletions
16
category.py
16
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
|
||||
|
|
16
locale/de.po
16
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"
|
||||
|
|
16
locale/en.po
16
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"
|
||||
|
|
Loading…
Reference in a new issue