wizard report: button gesperrt wen keine abstimmung
This commit is contained in:
parent
04fdd9dc9e
commit
9e64c49dc0
1 changed files with 14 additions and 6 deletions
|
@ -39,6 +39,8 @@ class RunCbReportStart(ModelView):
|
|||
self.reconciliations = self.on_change_with_reconciliations()
|
||||
if len(self.reconciliations or []) > 0:
|
||||
self.reconciliation = self.reconciliations[0]
|
||||
else :
|
||||
self.reconciliation = None
|
||||
else :
|
||||
self.reconciliations = []
|
||||
self.reconciliation = None
|
||||
|
@ -66,7 +68,10 @@ class RunCbReport(Wizard):
|
|||
selrecon = StateView('cashbook.runrepbook.start',
|
||||
'cashbook.runrepbook_view_form', [
|
||||
Button(string='Cancel', state='end', icon='tryton-cancel'),
|
||||
Button(string='Report', state='report_', icon='tryton-ok', default=True),
|
||||
Button(string='Report', state='report_', icon='tryton-ok', default=True,
|
||||
states={
|
||||
'readonly': ~Bool(Eval('reconciliation')),
|
||||
}),
|
||||
])
|
||||
report_ = StateReport('cashbook.reprecon')
|
||||
|
||||
|
@ -108,11 +113,14 @@ class RunCbReport(Wizard):
|
|||
""" run report
|
||||
"""
|
||||
# values for 'data' in report
|
||||
if self.selrecon.reconciliation:
|
||||
r1 = {
|
||||
'model': self.selrecon.reconciliation.__name__,
|
||||
'id': self.selrecon.reconciliation.id,
|
||||
'ids': [self.selrecon.reconciliation.id],
|
||||
}
|
||||
else :
|
||||
r1 = {'model': '', 'id': None, 'ids': []}
|
||||
return action, r1
|
||||
|
||||
def transition_report_(self):
|
||||
|
|
Loading…
Reference in a new issue