Invoice with Pos-Text (additional action in print-menu)

develop
Andreas Osim 2024-05-03 07:24:15 +02:00
parent 37e190f94c
commit 70feba9df5
3 changed files with 63 additions and 0 deletions

View File

@ -124,6 +124,11 @@ msgstr "<strong>Gesamtsumme</strong>"
msgid "<strong>Text short:</strong>" msgid "<strong>Text short:</strong>"
msgstr "<strong>Kurztext:</strong>" msgstr "<strong>Kurztext:</strong>"
#. module: dp_reports_account
#: model:ir.ui.view,arch_db:dp_reports_account.report_invoice_document
msgid "<strong>Pos:</strong>"
msgstr "<strong>Pos:</strong>"
#. module: dp_reports_account #. module: dp_reports_account
#: model:ir.ui.view,arch_db:dp_reports_account.report_invoice_document #: model:ir.ui.view,arch_db:dp_reports_account.report_invoice_document
msgid "<strong>Invoice Address</strong>" msgid "<strong>Invoice Address</strong>"
@ -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_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_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_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_display_name
#: model:ir.model.fields,field_description:dp_reports_account.field_report_dp_reports_account_report_invoice_with_intrastat_short_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" 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_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_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_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_id
#: model:ir.model.fields,field_description:dp_reports_account.field_report_dp_reports_account_report_invoice_with_intrastat_short_id #: model:ir.model.fields,field_description:dp_reports_account.field_report_dp_reports_account_report_invoice_with_intrastat_short_id
msgid "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_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_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_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___last_update
#: model:ir.model.fields,field_description:dp_reports_account.field_report_dp_reports_account_report_invoice_with_intrastat_short___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" msgid "Last Modified on"
@ -241,6 +249,11 @@ msgstr "Rabatt"
msgid "Invoice with text short" msgid "Invoice with text short"
msgstr "Rechnung Kurztext" 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 #. module: dp_reports_account
#: model:ir.actions.report,name:dp_reports_account.account_invoices_with_intrastat #: model:ir.actions.report,name:dp_reports_account.account_invoices_with_intrastat
msgid "Invoice w. Customs Tariff" msgid "Invoice w. Customs Tariff"
@ -293,6 +306,11 @@ msgstr "report.account_abstract_report"
msgid "report.dp_reports_account.report_invoice_short" msgid "report.dp_reports_account.report_invoice_short"
msgstr "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 #. module: dp_reports_account
#: model:ir.model,name:dp_reports_account.model_report_dp_reports_account_report_invoice_with_intrastat #: 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" msgid "report.dp_reports_account.report_invoice_with_intrastat"

View File

@ -67,6 +67,24 @@ class AccountInvoiceShort(models.AbstractModel):
'formatLang': self._formatLang, '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): class AccountInvoiceWithIntrastat(models.AbstractModel):
_name = 'report.dp_reports_account.report_invoice_with_intrastat' _name = 'report.dp_reports_account.report_invoice_with_intrastat'
_inherit = 'report.account_abstract_report' _inherit = 'report.account_abstract_report'

View File

@ -253,6 +253,11 @@
<span t-field="invoice_line.lot_formatted_note" /> <span t-field="invoice_line.lot_formatted_note" />
</t> </t>
</span> </span>
<span t-if="postext and invoice_line.lot_id.name">
<br/>
<strong>Pos:</strong>
<span t-field="invoice_line.lot_id.name"/>
</span>
<p t-if="invoice_line.lot_id.notes"> <p t-if="invoice_line.lot_id.notes">
<span t-field="invoice_line.lot_id.notes"/> <span t-field="invoice_line.lot_id.notes"/>
</p> </p>
@ -407,6 +412,15 @@
</t> </t>
</template> </template>
<template id="report_invoice_extra">
<t t-call="web.html_container">
<t t-set="postext" t-value="True"/>
<t t-foreach="docs" t-as="o">
<t t-call="dp_reports_account.report_invoice_document" t-lang="o.partner_id.lang"/>
</t>
</t>
</template>
<record id="account.account_invoices" model="ir.actions.report"> <record id="account.account_invoices" model="ir.actions.report">
<field name="paperformat_id" ref="dp_reports.paperformat_a4_european"/> <field name="paperformat_id" ref="dp_reports.paperformat_a4_european"/>
<field name="binding_model_id" eval="False"/> <field name="binding_model_id" eval="False"/>
@ -430,6 +444,19 @@
menu="False" menu="False"
/> />
<report
id="account_invoices_extra"
model="account.invoice"
string="Invoice with text extra"
report_type="qweb-pdf"
name="dp_reports_account.report_invoice_extra"
file="dp_reports_account.report_invoice_extra"
attachment="(object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/','')+'.pdf')"
print_report_name="(object._get_printed_report_name())"
paperformat="dp_reports.paperformat_a4_european"
menu="False"
/>
<report <report
id="account_invoices_with_intrastat" id="account_invoices_with_intrastat"
model="account.invoice" model="account.invoice"