kategorie, verknüpfung zu kassenbuch, forms

This commit is contained in:
Frederik Jaeckel 2022-11-07 23:11:41 +01:00
parent 5bb6421692
commit c69b9c86d8
16 changed files with 561 additions and 0 deletions

29
book.py Normal file
View file

@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.model import ModelSQL, fields
from trytond.transaction import Transaction
from trytond.pool import Pool, PoolMeta
class Cashbook(metaclass=PoolMeta):
__name__ = 'cashbook.book'
categories = fields.Many2Many(string='Categories',
relation_name='cashbook.bookcategory-rel',
origin='cashbook', target='category')
# end Cashbook
class CategoryCashbookRel(ModelSQL):
'Category Cashbook Relation'
__name__ = 'cashbook.bookcategory-rel'
category = fields.Many2One(string='Category', required=True, select=True,
model_name='cashbook.bookcategory', ondelete='CASCADE')
cashbook = fields.Many2One(string='Cashbook', required=True, select=True,
model_name='cashbook.book', ondelete='CASCADE')
# end CategoryCashbookRel