Hello guys i created a custom module in odoo 18 that can modify some standard reports like invoices , sales , purchase order , etc
so in the custom module i dont declare a new report i just inherit the templates of the reports and do what i need to modify the reports now i want to change the print_report_name using the custom module and i did't figure something out yet i tried overwriting the report action and nothing worked i used some python but i just made a lot of erros so if some one can help me with this i'll appreciate it 😊
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
Hi,
Here is an example of Purchase Report in Odoo 18:-
<record id="purchase.report_purchase_quotation" model="ir.actions.report">
<field name="name">Purchase Report</field>
<field name="print_report_name">'Purchase Report - %s' % (object.name)</field>
</record>
Please provide the external ID of the report that needs to change as the id in the record. And you can provide the new name for the report in print_report_name.
Hope it helps
hello , thanks for responding , in the xml file i had inherited the template of the purchase order report here is the code
<template id="bon_commande_report_id" inherit_id="purchase.report_purchaseorder_document" >
<xpath expr="//t[@t-call='web.external_layout']" position="replace">
<t t-call="web.external_layout">
when i tried the code u gave me i got this
odoo.tools.convert.ParseError: while parsing /mnt/extra-addons/document_report/views/views.xml:175
For external id purchase.report_purchaseorder_document when trying to create/update a record of model ir.actions.report found record of different model ir.ui.view (33779)
¿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 | |
---|---|---|---|---|
|
0
jul 25
|
273 | ||
|
0
jul 25
|
905 | ||
|
1
may 25
|
1342 | ||
|
1
abr 25
|
1296 | ||
|
1
jun 25
|
928 |