formatting, indexes optimized
This commit is contained in:
parent
510357a13c
commit
9ee924f0d8
11 changed files with 90 additions and 94 deletions
|
@ -50,7 +50,7 @@ class EnterBookingStart(ModelView):
|
|||
string='Category',
|
||||
model_name='cashbook.category', depends=['bookingtype'],
|
||||
states={
|
||||
'readonly': Bool(Eval('bookingtype')) == False,
|
||||
'readonly': ~Bool(Eval('bookingtype')),
|
||||
'required': Eval('bookingtype', '').in_(['in', 'out']),
|
||||
'invisible': ~Eval('bookingtype', '').in_(['in', 'out']),
|
||||
},
|
||||
|
@ -90,7 +90,8 @@ class EnterBookingStart(ModelView):
|
|||
|
||||
if self.bookingtype:
|
||||
if self.category:
|
||||
if self.bookingtype not in types.get(self.category.cattype, ''):
|
||||
if self.bookingtype not in types.get(
|
||||
self.category.cattype, ''):
|
||||
self.category = None
|
||||
|
||||
@fields.depends('cashbook', '_parent_cashbook.owner')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue