book: neues Feld 'description', sperrt btype-->None mit Zeilen + Test

line: verwendet nur kassenbücher mit typ
This commit is contained in:
Frederik Jaeckel 2022-09-16 10:15:51 +02:00
parent a2e7f192f8
commit 2acdc55efb
12 changed files with 107 additions and 11 deletions

View file

@ -16,7 +16,7 @@ class OpenCashBookStart(ModelView):
__name__ = 'cashbook.open_lines.start'
cashbook = fields.Many2One(string='Cashbook', model_name='cashbook.book',
required=True)
required=True, domain=[('btype', '!=', None)])
checked = fields.Boolean(string='Checked', help="Show cashbook lines in Checked-state.")
done = fields.Boolean(string='Done', help="Show cashbook lines in Done-state")
date_from = fields.Date(string='Start Date')
@ -54,7 +54,7 @@ class OpenCashBook(Wizard):
with Transaction().set_context({
'_check_access': True,
}):
books = Book.search([])
books = Book.search([('btype', '!=', None)])
if len(books) == 1:
return 'open_'
return 'askuser'
@ -90,7 +90,7 @@ class OpenCashBook(Wizard):
with Transaction().set_context({
'_check_access': True,
}):
books = Book.search([])
books = Book.search([('btype', '!=', None)])
if len(books) > 0:
book = books[0]