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
|
@ -20,7 +20,7 @@ class EnterBookingStart(ModelView):
|
|||
__name__ = 'cashbook.enterbooking.start'
|
||||
|
||||
cashbook = fields.Many2One(string='Cashbook', model_name='cashbook.book',
|
||||
domain=[('id', 'in', Eval('cashbooks', []))],
|
||||
domain=[('id', 'in', Eval('cashbooks', [])), ('btype', '!=', None)],
|
||||
depends=['cashbooks'], required=True)
|
||||
cashbooks = fields.One2Many(string='Cashbooks', field=None,
|
||||
model_name='cashbook.book', readonly=True,
|
||||
|
@ -137,6 +137,7 @@ class EnterBookingWizard(Wizard):
|
|||
result = {
|
||||
'cashbooks': [x.id for x in Cashbook.search([
|
||||
('state', '=', 'open'),
|
||||
('btype', '!=', None),
|
||||
('owner.id', '=', Transaction().user),
|
||||
])],
|
||||
'bookingtype': getattr(self.start, 'bookingtype', 'out'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue