formatting

This commit is contained in:
Frederik Jaeckel 2024-11-21 14:34:17 +01:00
parent 0b2bada596
commit 08b8768dd4
4 changed files with 11 additions and 22 deletions

View file

@ -18,8 +18,7 @@ sel_edocument = [
edoc_versions = {
'edocument.xrechnung.invoice': 'XRechnung-2.2',
'edocument.uncefact.invoice': '16B-CII',
}
'edocument.uncefact.invoice': '16B-CII'}
class RunXRechnungReportStart(ModelView):
@ -62,8 +61,7 @@ class RunXRechnungReport(Wizard):
buttons=[
Button(string='Cancel', state='end', icon='tryton-cancel'),
Button(string='Export', state='export', icon='tryton-export'),
],
)
])
def default_start(self, fields):
""" set defaults
@ -75,8 +73,7 @@ class RunXRechnungReport(Wizard):
result = {
'edocument': 'edocument.xrechnung.invoice',
'invoice': context.get('active_id', -1),
'state': invoice[0].state if len(invoice) > 0 else '',
}
'state': invoice[0].state if invoice else ''}
return result
def do_export(self, action):
@ -85,12 +82,10 @@ class RunXRechnungReport(Wizard):
if self.start.state != 'posted':
raise UserError(gettext(
'account_invoice_xrechnung.msg_invoice_must_posted',
invname=self.start.invoice.rec_name,
))
invname=self.start.invoice.rec_name))
return action, {
'invoice': self.start.invoice.id,
'edocument': self.start.edocument,
'as_zip': self.start.as_zip,
}
'as_zip': self.start.as_zip}
# end RunXRechnungReport