I added a custom button in POS to generate a pdf.
How can I get the same information when printing the receipt from the standard button.
def print_report(self):
return self.env.ref('pos_print.pos_ord_session_reprt').report_action(self,data={'name':'POS Order Report'})
<t t-extend="ReceiptScreenWidget">
<t t-jquery=".button.print" t-operation="after">
<div class="button order-print">
<i class='fa fa-print'></i>
Print POS Order
</div>
</t>
</t>
<report
id="pos_ord_session_reprt"
string="Pos Order Report"
model="sale.wizard"
report_type="qweb-pdf"
file="pos_print.pos_order_template"
name="pos_print.pos_order_template"
/>
<template id="pos_order_template">
<t t-call="web.html_container">
<t t-call="web.external_layout">
<div class="page">
<h2 align="center">POS Order Report</h2>
</div>
</t>
</t>
</template>
Any help please? Thanks.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…