formatting

This commit is contained in:
Frederik Jaeckel 2023-06-05 21:06:03 +02:00
parent 91674d81e3
commit 4ae07b962f
5 changed files with 30 additions and 21 deletions

View file

@ -9,7 +9,8 @@ from trytond.pool import PoolMeta
class Cashbook(metaclass=PoolMeta):
__name__ = 'cashbook.book'
categories = fields.Many2Many(string='Categories',
categories = fields.Many2Many(
string='Categories',
relation_name='cashbook.bookcategory-rel',
origin='cashbook', target='category')
@ -20,9 +21,11 @@ class CategoryCashbookRel(ModelSQL):
'Category Cashbook Relation'
__name__ = 'cashbook.bookcategory-rel'
category = fields.Many2One(string='Category', required=True, select=True,
category = fields.Many2One(
string='Category', required=True, select=True,
model_name='cashbook.bookcategory', ondelete='CASCADE')
cashbook = fields.Many2One(string='Cashbook', required=True, select=True,
cashbook = fields.Many2One(
string='Cashbook', required=True, select=True,
model_name='cashbook.book', ondelete='CASCADE')
# end CategoryCashbookRel