I created module that overrides default invoice and it should use different rml file making it easy to change without changing anything in original account module.
But somehow it still used old rml file even though in settings/actions/reports, it shows that report is using my custom rml which is located in my module. When I edit my rml file, nothing changes. When I edit original rml file (that should be overriden and shouldn't affect what will be printed in invoice) it changes my printed invoice, when I edit my rml file nothing changes.
Is something went wrong?

In V7 there are different solutions to print. (A top print button with pulldown list, B below print button eg red) Print Button A maybe disappear if multi="True".
The report id is hard coded in the method called if you click on print button B.

I have overwritten the invoice_print method and changed the return value to my report.
It works for me, maybe there are better solutions.

Yes I did use OpenERP 7. I used your code and it worked. Just needed a bit of modifications, because newer openerp revisions changed where osv and tools are located. Now it should be:
from openerp.osv import osv, fieldsfrom openerp.tools.translate import _
.Thanks.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just
use the commenting tool. Please remember that you can always revise your answers
- no need to answer the same question twice. Also, please don't forget to vote
- it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines