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:
- CRM
- e-Commerce
- Contabilidad
- Inventario
- PoS
- Project
- MRP
Se marcó esta pregunta
3
Respuestas
21360
Vistas
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)
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
InscribirsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
|
3
oct 23
|
7737 | ||
|
1
sept 23
|
2814 | ||
|
1
may 23
|
1773 | ||
|
2
abr 23
|
2316 | ||
Inherit Element form kanban View
Resuelto
|
|
1
mar 23
|
1747 |
Thanks Niyas and Sudhir