I want to add a button in a form view, the action of this is to print the report. How can I do this? it seems like printing report in Odoo 12 is far different from Odoo10. can someone have the tutorial for this scenario? Thanks :)
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
3
回复
21168
查看
Hi,
Check the code of the print button added in the sale order form.
See a sample below:
return self.env.ref('test.test_report').report_action(record_id)
in the below image you can see the code of the print button in the sale order form.
Thanks
As Niyas said, you can get the reference from the core modules like Sales, Purchase.
Ex:
return self.env.ref('module_name.XML_ID_of_report').report_action(self)
相关帖文 | 回复 | 查看 | 活动 | |
---|---|---|---|---|
|
3
10月 23
|
7375 | ||
|
1
9月 23
|
2623 | ||
|
1
5月 23
|
1600 | ||
|
2
4月 23
|
2012 | ||
|
1
3月 23
|
1548 |
Thanks Niyas and Sudhir