formatting, indexes optimized
This commit is contained in:
parent
77ee7d15b7
commit
7220cff5ac
12 changed files with 124 additions and 126 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