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
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
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)
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
0
Jul 25
|
268 | ||
|
0
Jul 25
|
899 | ||
|
1
May 25
|
1326 | ||
|
1
Apr 25
|
1292 | ||
|
1
Jun 25
|
926 |