From 70feba9df5264ea7609ea8e35db70dc1c024e274 Mon Sep 17 00:00:00 2001 From: Andreas Osim Date: Fri, 3 May 2024 07:24:15 +0200 Subject: [PATCH] Invoice with Pos-Text (additional action in print-menu) --- .../dp_reports_account/i18n/de.po | 18 +++++++++++++ .../models/report_helper.py | 18 +++++++++++++ .../dp_reports_account/reports/invoice.xml | 27 +++++++++++++++++++ 3 files changed, 63 insertions(+) diff --git a/ext/custom-addons/dp_reports_account/i18n/de.po b/ext/custom-addons/dp_reports_account/i18n/de.po index 28454fd9..deb3680e 100644 --- a/ext/custom-addons/dp_reports_account/i18n/de.po +++ b/ext/custom-addons/dp_reports_account/i18n/de.po @@ -124,6 +124,11 @@ msgstr "Gesamtsumme" msgid "Text short:" msgstr "Kurztext:" +#. module: dp_reports_account +#: model:ir.ui.view,arch_db:dp_reports_account.report_invoice_document +msgid "Pos:" +msgstr "Pos:" + #. module: dp_reports_account #: model:ir.ui.view,arch_db:dp_reports_account.report_invoice_document msgid "Invoice Address" @@ -148,6 +153,7 @@ msgstr "Artikel" #: model:ir.model.fields,field_description:dp_reports_account.field_report_account_abstract_report_display_name #: model:ir.model.fields,field_description:dp_reports_account.field_report_account_report_invoice_display_name #: model:ir.model.fields,field_description:dp_reports_account.field_report_dp_reports_account_report_invoice_short_display_name +#: model:ir.model.fields,field_description:dp_reports_account.field_report_dp_reports_account_report_invoice_extra_display_name #: model:ir.model.fields,field_description:dp_reports_account.field_report_dp_reports_account_report_invoice_with_intrastat_display_name #: model:ir.model.fields,field_description:dp_reports_account.field_report_dp_reports_account_report_invoice_with_intrastat_short_display_name msgid "Display Name" @@ -182,6 +188,7 @@ msgstr "Gewicht" #: model:ir.model.fields,field_description:dp_reports_account.field_report_account_abstract_report_id #: model:ir.model.fields,field_description:dp_reports_account.field_report_account_report_invoice_id #: model:ir.model.fields,field_description:dp_reports_account.field_report_dp_reports_account_report_invoice_short_id +#: model:ir.model.fields,field_description:dp_reports_account.field_report_dp_reports_account_report_invoice_extra_id #: model:ir.model.fields,field_description:dp_reports_account.field_report_dp_reports_account_report_invoice_with_intrastat_id #: model:ir.model.fields,field_description:dp_reports_account.field_report_dp_reports_account_report_invoice_with_intrastat_short_id msgid "ID" @@ -201,6 +208,7 @@ msgstr "Rechungsposition" #: model:ir.model.fields,field_description:dp_reports_account.field_report_account_abstract_report___last_update #: model:ir.model.fields,field_description:dp_reports_account.field_report_account_report_invoice___last_update #: model:ir.model.fields,field_description:dp_reports_account.field_report_dp_reports_account_report_invoice_short___last_update +#: model:ir.model.fields,field_description:dp_reports_account.field_report_dp_reports_account_report_invoice_extra___last_update #: model:ir.model.fields,field_description:dp_reports_account.field_report_dp_reports_account_report_invoice_with_intrastat___last_update #: model:ir.model.fields,field_description:dp_reports_account.field_report_dp_reports_account_report_invoice_with_intrastat_short___last_update msgid "Last Modified on" @@ -241,6 +249,11 @@ msgstr "Rabatt" msgid "Invoice with text short" msgstr "Rechnung Kurztext" +#. module: dp_reports_account +#: model:ir.actions.report,name:dp_reports_account.account_invoices_extra +msgid "Invoice with text extra" +msgstr "Rechnung Pos-Text" + #. module: dp_reports_account #: model:ir.actions.report,name:dp_reports_account.account_invoices_with_intrastat msgid "Invoice w. Customs Tariff" @@ -293,6 +306,11 @@ msgstr "report.account_abstract_report" msgid "report.dp_reports_account.report_invoice_short" msgstr "report.dp_reports_account.report_invoice_short" +#. module: dp_reports_account +#: model:ir.model,name:dp_reports_account.model_report_dp_reports_account_report_invoice_extra +msgid "report.dp_reports_account.report_invoice_extra" +msgstr "report.dp_reports_account.report_invoice_extra" + #. module: dp_reports_account #: model:ir.model,name:dp_reports_account.model_report_dp_reports_account_report_invoice_with_intrastat msgid "report.dp_reports_account.report_invoice_with_intrastat" diff --git a/ext/custom-addons/dp_reports_account/models/report_helper.py b/ext/custom-addons/dp_reports_account/models/report_helper.py index 9f8bd42f..8166c6e6 100644 --- a/ext/custom-addons/dp_reports_account/models/report_helper.py +++ b/ext/custom-addons/dp_reports_account/models/report_helper.py @@ -67,6 +67,24 @@ class AccountInvoiceShort(models.AbstractModel): 'formatLang': self._formatLang, } +class AccountInvoiceExtra(models.AbstractModel): + _name = 'report.dp_reports_account.report_invoice_extra' + _inherit = 'report.account_abstract_report' + _template = 'dp_reports_account.report_invoice_extra' + + @api.model + def get_report_values(self, docids, data=None): + model = 'account.invoice' + docs = self.env[model].browse(docids) + return { + 'doc_ids': docids, + 'doc_model': model, + 'docs': docs, + 'data': data, + 'field_set_in_lines': self._field_set_in_lines, + 'formatLang': self._formatLang, + } + class AccountInvoiceWithIntrastat(models.AbstractModel): _name = 'report.dp_reports_account.report_invoice_with_intrastat' _inherit = 'report.account_abstract_report' diff --git a/ext/custom-addons/dp_reports_account/reports/invoice.xml b/ext/custom-addons/dp_reports_account/reports/invoice.xml index 1fcaa886..9cd16aa1 100644 --- a/ext/custom-addons/dp_reports_account/reports/invoice.xml +++ b/ext/custom-addons/dp_reports_account/reports/invoice.xml @@ -253,6 +253,11 @@ + +
+ Pos: + +

@@ -407,6 +412,15 @@ + + @@ -430,6 +444,19 @@ menu="False" /> + +