formatting
This commit is contained in:
parent
91674d81e3
commit
4ae07b962f
5 changed files with 30 additions and 21 deletions
9
book.py
9
book.py
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue