diff --git a/locale/de.po b/locale/de.po index e877610..92b2ed1 100644 --- a/locale/de.po +++ b/locale/de.po @@ -30,6 +30,22 @@ msgctxt "field:account_invoice_xrechnung.runrep.start,edocument:" msgid "Type" msgstr "Typ" +msgctxt "selection:account_invoice_xrechnung.runrep.start,edocument:" +msgid "XRechnung UBL Invoice 2.2" +msgstr "XRechnung UBL Invoice 2.2" + +msgctxt "selection:account_invoice_xrechnung.runrep.start,edocument:" +msgid "XRechnung UBL Invoice 2.3" +msgstr "XRechnung UBL Invoice 2.3" + +msgctxt "selection:account_invoice_xrechnung.runrep.start,edocument:" +msgid "XRechnung UBL Invoice 3.0" +msgstr "XRechnung UBL Invoice 3.0" + +msgctxt "selection:account_invoice_xrechnung.runrep.start,edocument:" +msgid "CII CrossIndustryInvoice D16B" +msgstr "CII CrossIndustryInvoice D16B" + msgctxt "field:account_invoice_xrechnung.runrep.start,as_zip:" msgid "ZIP-File" msgstr "ZIP-Datei" diff --git a/locale/en.po b/locale/en.po index 5d9a36b..cd77d2b 100644 --- a/locale/en.po +++ b/locale/en.po @@ -22,6 +22,22 @@ msgctxt "field:account_invoice_xrechnung.runrep.start,edocument:" msgid "Type" msgstr "Type" +msgctxt "selection:account_invoice_xrechnung.runrep.start,edocument:" +msgid "XRechnung UBL Invoice 2.2" +msgstr "XRechnung UBL Invoice 2.2" + +msgctxt "selection:account_invoice_xrechnung.runrep.start,edocument:" +msgid "XRechnung UBL Invoice 2.3" +msgstr "XRechnung UBL Invoice 2.3" + +msgctxt "selection:account_invoice_xrechnung.runrep.start,edocument:" +msgid "XRechnung UBL Invoice 3.0" +msgstr "XRechnung UBL Invoice 3.0" + +msgctxt "selection:account_invoice_xrechnung.runrep.start,edocument:" +msgid "CII CrossIndustryInvoice D16B" +msgstr "CII CrossIndustryInvoice D16B" + msgctxt "field:account_invoice_xrechnung.runrep.start,as_zip:" msgid "ZIP-File" msgstr "ZIP-File" @@ -38,3 +54,7 @@ msgctxt "wizard_button:account_invoice_xrechnung.runrep,start,export:" msgid "Export" msgstr "Export" +msgctxt "model:account_invoice_xrechnung.export,name:" +msgid "eDocument Export" +msgstr "eDocument Export" + diff --git a/wizard_runreport.py b/wizard_runreport.py index 79977f4..d182832 100644 --- a/wizard_runreport.py +++ b/wizard_runreport.py @@ -12,12 +12,16 @@ from trytond.transaction import Transaction sel_edocument = [ - ('edocument.xrechnung.invoice', 'XRechnung UBL Invoice 2.1.1'), + ('edocument.xrechnung.invoice-2.2', 'XRechnung UBL Invoice 2.2'), + ('edocument.xrechnung.invoice-2.3', 'XRechnung UBL Invoice 2.3'), + ('edocument.xrechnung.invoice-3.0', 'XRechnung UBL Invoice 3.0'), ('edocument.uncefact.invoice', 'CII CrossIndustryInvoice D16B'), ] edoc_versions = { - 'edocument.xrechnung.invoice': 'XRechnung-2.2', + 'edocument.xrechnung.invoice-2.2': 'XRechnung-2.2', + 'edocument.xrechnung.invoice-2.3': 'XRechnung-2.3', + 'edocument.xrechnung.invoice-3.0': 'XRechnung-3.0', 'edocument.uncefact.invoice': '16B-CII'} @@ -44,7 +48,7 @@ class RunXRechnungReportStart(ModelView): def default_edocument(cls): """ default xrechnung """ - return 'edocument.xrechnung.invoice' + return 'edocument.xrechnung.invoice-3.0' # end RunXRechnungReportStart @@ -67,11 +71,13 @@ class RunXRechnungReport(Wizard): """ set defaults """ context = Transaction().context - Invoice = Pool().get('account.invoice') + pool = Pool() + Invoice = pool.get('account.invoice') + WizRepStart = pool.get('account_invoice_xrechnung.runrep.start') invoice = Invoice.browse([context.get('active_id', -1)]) result = { - 'edocument': 'edocument.xrechnung.invoice', + 'edocument': WizRepStart.default_edocument(), 'invoice': context.get('active_id', -1), 'state': invoice[0].state if invoice else ''} return result diff --git a/xreport.py b/xreport.py index a62acbc..4d68e82 100644 --- a/xreport.py +++ b/xreport.py @@ -31,7 +31,7 @@ class XReport(Report): pool = Pool() IrDate = pool.get('ir.date') Invoice = pool.get('account.invoice') - EDocument = pool.get(data['edocument']) + EDocument = pool.get(data['edocument'].split('-')[0]) invoice, = Invoice.browse([data['invoice']]) template = EDocument(invoice)