Odoo Help

Welcome!

This community 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.

2

Edit invoice template in Odoo 8

By
TVDC
on 12/28/14, 10:41 AM 27,389 views

I've read multiple threads about customizing reports in Odoo 8, but could find an answer to my question:

How can we edit the invoice template in Odoo 8? In OpenERP7 we used make files to edit invoices, but it seems that webkit is obsolete.

Trying to change the document type from PDF to Webkit did not help as we were unable to locate the .mako files.

We tried the qWeb editor as suggested in this thread (https://www.odoo.com/forum/help-1/question/is-there-any-way-to-preview-webkit-report-layout-while-coding-maybe-wysiwyg-editor-52307#answer-52417), but this only edits the layout.

We need to be able to add variables (BBA structured ref, expiration date, dank details,...) and the PDF wich is attached to the outgoing mail template should also be updated.

Any ideas?

It seems that I can only comment on my own post... David, you helped me a lot. However I'm still unable to edit the footer... I tried to adapt company details under settings > Companies > Companies, tried to toggle "Custom footer" under Report Configuration, but nothing helps... Another issue is that the language of the attached PDF does not change when I set the customer to another language. The email template does however update the language.

TVDC
on 12/30/14, 10:22 AM

Hi TVDC, I'm not certain on the resolution for the language issue but I can try to help with the footer issue. This is where you need to modify the footer: http://screencast.com/t/HXvAsREi Does that help?

David Birchmier
on 1/1/15, 2:31 PM

Hi David, indeed I found that before. But unfortunately, it does not update the report. Even after toggling "custom footer". I think i'm missing some detail somewhere...

TVDC
on 1/1/15, 2:53 PM

Very strange. It does work for me after I CHECKBOX the custom footer. What is the name of the report you're trying to print? Is it just the standard "Invoices" one?

David Birchmier
on 1/1/15, 3:25 PM

Can you make a word document of what you want to achieve? I will try to help you.

Abdullah Sofan
on 12/28/14, 10:54 AM

Hi, just fyi as this was urgent for us we outsourced this job to a freelancer who has way more Odoo skills than me. He fixed it, but I have no idea how :)

TVDC
on 1/27/15, 7:12 AM
4
David Birchmier
On 12/28/14, 4:22 PM

Hi TVDC,

I'll try to help out as I was also very confused about this when I first started working with Odoo v8. 

The short answer is:

1) You can use  "HTML" and edit the template via the visual WYSIWIG editor. To do this, locate the invoice you wish to modify and change the default from PDF to HTML.  Now open ANY invoice. Select Print > Invoices (or whatever you named your invoice). From here a new window will appear and an "EDIT" button will appear in the upper left. Click EDIT and change what you wish. I personally found this far too restrictive to accomplish what I wanted. I wound up with option #2.

2) Option #2 is to use QWeb. QWeb is Odoo v8's new templating system. To do this go back to Settings > Reports > Invoices (or whatever the name of your invoice is) and select "Search QWeb Views". There will be two options here. Select the one with the suffix _document 
On this screen you can edit the raw HTML / XML as you see fit.

You will see lots of talk around these forums of RML. My understanding is that this is Odoo's OLD method of modifying invoices. You should ignore everything other than QWeb or editiing it via the WYSIWIG editor. (The two options I listed above)

I have tried to include more detail in another post where I had a similiar question, here:
https://www.odoo.com/forum/help-1/question/modifying-invoice-templates-creating-multiple-invoice-templates-in-odoo-v8-71588 

0
Paulo Lima
On 6/16/15, 1:19 PM

The Option#2 is quite effective, 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

Question tools

3 follower(s)

Stats

Asked: 12/28/14, 10:41 AM
Seen: 27389 times
Last updated: 11/1/16, 6:15 PM