跳至内容
菜单
此问题已终结
1 回复
5913 查看

I want to add print functionality in Journal Entries screen, which should be displayed and should work like print in invoice screen. How to do this?

形象
丢弃
最佳答案

To show the print report in report menu you have to :

1- create report and link it with the required model

2- create your template and link it with the report definition

EX:

<report
id="report_print_journal"
string="Print Journal"
model="account.move"
report_type="qweb-pdf"
name="account.print_journal"
file="account.print_journal"
print_report_name="'Print Journal- %s' % (object.name).replace('/', '')"
/>

<template id="print_journal">
<t t-call="web.basic_layout">
<div class="page">
<t t-foreach="docs" t-as="guest"> #here means the recordset of model

and complete you report
形象
丢弃
编写者

Thanks for your answer

相关帖文 回复 查看 活动
1
4月 19
4226
2
7月 25
1444
5
5月 25
9438
3
2月 25
2784
0
1月 24
1433