book: neues Feld 'description', sperrt btype-->None mit Zeilen + Test
line: verwendet nur kassenbücher mit typ
This commit is contained in:
parent
a2e7f192f8
commit
2acdc55efb
12 changed files with 107 additions and 11 deletions
3
line.py
3
line.py
|
@ -931,6 +931,7 @@ class LineContext(ModelView):
|
|||
|
||||
cashbook = fields.Many2One(string='Cashbook', required=True,
|
||||
model_name='cashbook.book',
|
||||
domain=[('btype', '!=', None)],
|
||||
states={
|
||||
'readonly': Eval('num_cashbook', 0) < 2,
|
||||
}, depends=['num_cashbook'])
|
||||
|
@ -993,7 +994,7 @@ class LineContext(ModelView):
|
|||
with Transaction().set_context({
|
||||
'_check_access': True,
|
||||
}):
|
||||
return CashBook.search_count([])
|
||||
return CashBook.search_count([('btype', '!=', None)])
|
||||
|
||||
@classmethod
|
||||
def default_done(cls):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue