[11.0][FIX] account_payment_order: printing report

This commit is contained in:
Andrea
2018-01-22 13:47:14 +01:00
parent 791e470a05
commit a761667e5b
3 changed files with 5 additions and 7 deletions

View File

@@ -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, "

View File

@@ -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):

View File

@@ -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>