Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
5929 Lượt xem

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?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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
Ảnh đại diện
Huỷ bỏ
Tác giả

Thanks for your answer

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 4 19
4245
2
thg 7 25
1477
5
thg 5 25
9461
3
thg 2 25
2815
0
thg 1 24
1444