Odoo Help


How to modify a report without overriding it ? Is it possible ?

on 11/4/14, 5:48 AM 1,147 views

Hi !

I have two modules, "foo" and "bar":

"foo" overrides the report account_print_invoice.rml from the account module. It prints the related vouchers below the invoice.
"bar" adds fields to the account.voucher object.

I want "bar" to add these fields in the new report from my first module, only if "foo" is installed.
Must I override the whole report again ? What if one module is installed, and not the other ?

In general, how to modify a report without overriding it ? Is it even possible ?
If not, that means a lot of problems with mods overriding each other's reports...

Thanks !

Guillaume Seran
On 11/4/14, 8:24 AM


you can create a function in your foo_report_parser.py that check if the field exist.
And you call this function in your rml report.It print or not your field value.

That's a nice idea. I will try this out :)

on 11/5/14, 3:12 AM

Ben Bernard

--Ben Bernard--

| 4 3 6
Jakarta, Indonesia
--Ben Bernard--
Ben Bernard
On 11/4/14, 9:13 AM

I think "bar" should be ignorance of how report is generated. You said: "It prints the related vouchers below the invoice.", so "foo" already have access to "bar", which is convenience because it can also access fields you defined in "bar".


That is not true. "foo" have access to an object, and "bar" extends that object. "foo" would have access to the fields defined in "bar" at all times if I added "bar" in the dependencies list of "foo". But I would not do that, since someone might want to install only one of the two modules. I hope you understand me ^^

on 11/5/14, 3:17 AM

Ahh.. My suggestion imply that bar can be independent. But, "foo" depends on "bar". If you don't want "foo" to depends on "bar", then Guillaume Seran is a good idea, but be aware that it can be hard to maintain in the future.

Ben Bernard
on 11/5/14, 5:43 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 11/4/14, 5:48 AM
Seen: 1147 times
Last updated: 3/16/15, 8:10 AM