hello i'm trying to add my custom res.company fields to the header of the financial reports "balance sheet, profit and loss, etc." so i found where the view is "acount_report.main_template" in the repor_finacial.xml file, so i made a module and with the xpath i got in to the template so if i add static elements it works perfectly, but the question is how to add my custom fields in this header?, the structure of the template is kind of different from what i've seen in other reports, is there any idea, i was trying with qweb only, but probably i would need some python.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
1
Reply
5790
Views
The solution was easier than i thought, i'll post it here for someone that could need it
<span t-field="res_company.nit"></span>
# so you just need to inherit the template for this reports,template id="reportes_header_pdf" inherit_id="account_reports.filter_info_template">
<xpath expr="//div[hasclass('print_only')]" position="inside">
here you paste the code from the financial report template to make your changes
like adding your custom fields<span t-field="res_company.nit"></span></xpath>
</template>
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 | |
---|---|---|---|---|
|
1
Oct 19
|
2822 | ||
|
0
Jul 21
|
1370 | ||
|
1
Jan 21
|
7853 | ||
|
6
Dec 20
|
7395 | ||
|
1
Jun 20
|
1798 |