mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[11.0][FIX] account_payment_order: printing report
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
{
|
||||
'name': 'Account Payment Order',
|
||||
'version': '11.0.1.1.0',
|
||||
'version': '11.0.1.1.1',
|
||||
'license': 'AGPL-3',
|
||||
'author': "ACSONE SA/NV, "
|
||||
"Therp BV, "
|
||||
|
||||
@@ -9,11 +9,11 @@ class AccountPaymentOrderReport(models.AbstractModel):
|
||||
_name = 'report.account_payment_order.print_account_payment_order_main'
|
||||
|
||||
@api.model
|
||||
def render_html(self, docids, data=None):
|
||||
def get_report_values(self, docids, data=None):
|
||||
AccountPaymentOrderObj = self.env['account.payment.order']
|
||||
docs = AccountPaymentOrderObj.browse(docids)
|
||||
|
||||
docargs = {
|
||||
return {
|
||||
'doc_ids': docids,
|
||||
'doc_model': 'account.payment.order',
|
||||
'docs': docs,
|
||||
@@ -22,8 +22,6 @@ class AccountPaymentOrderReport(models.AbstractModel):
|
||||
'get_bank_account_name': self.get_bank_account_name,
|
||||
'formatLang': formatLang,
|
||||
}
|
||||
return self.env['report'].render(
|
||||
'account_payment_order.print_account_payment_order_main', docargs)
|
||||
|
||||
@api.model
|
||||
def get_bank_account_name(self, partner_bank):
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
<template id="print_account_payment_order_document">
|
||||
<t t-set="doc" t-value="doc.with_context({'lang':doc.generated_user_id.lang})" />
|
||||
<t t-call="report.external_layout">
|
||||
<t t-call="web.external_layout">
|
||||
<div class="page">
|
||||
<div class="oe_structure"/>
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
</template>
|
||||
|
||||
<template id="print_account_payment_order_main">
|
||||
<t t-call="report.html_container">
|
||||
<t t-call="web.html_container">
|
||||
<t t-foreach="docs" t-as="doc">
|
||||
<t t-call="account_payment_order.print_account_payment_order_document" t-lang="doc.generated_user_id.lang"/>
|
||||
</t>
|
||||
|
||||
Reference in New Issue
Block a user