Modifying Invoice Templates & Creating Multiple Invoice Templates in Odoo v8
I am attempting to learn how to modify invoice templates in Odoo v8. I have searched these forums and read a lot of different information but I am unclear as to the proper procedure in Odoo v8.
I'll start off with what I have already tried:
- Using the HTML WYSIWIG editor to modify invoices
I found information in other posts about modifying invoices this way.
Here are the steps I followed:
#1 Go to Settings > Reports > Reports > Invoices and change the Report Type from PDF to HTML
#2 Go to Accounting > Customer Invoices > Open an Invoice > Print > "Invoices"
#3 A new pop-up window appears. This window does have the HTML WYSIWIG editor enabled.
#4 If I make modifications here and change things, then AFTER hitting SAVE it does NOT make these changes permanent. I.e. I I open another invoice and select Print > Invoices again then I see the original default template.
QUESTION #1: How do you make changes you make using the WYSIWIG editor actually save permanently to the invoice template?
EDIT: I was wrong. This is actually working just fine. I was trying to modify the HEADER/FOOTER areas which you can NOT edit via the HTML Editor while viewing an invoice.
- Edit QWeb Views
I also found some information in the forums about modifying invoices in this way.
Here are the steps I followed:
#1 Go to Settings > Reports > Reports Invoices
#2 Select "Search Associated QWeb Views"
#3 Click on "report_invoice_document"
#4 Modify the HTML layout
#5 After modifying this layout I was successful in seeing my changes outputted to the invoice template. However, through modifying the invoice template in this way I was NOT able to edit the invoice header. I assume I must modify this elsewhere and will add details about that in the next item.
QUESTION #2: Where do I modify the header that effects Invoices?
EDIT: I have answered this in my reply/answer below.
- Modifying the Invoice Header
Since I was unable to modify the invoice header in the QWeb Views "report_invoice_document" I searched for where to modify it.
These are the steps I followed:
#1 Settings > Companies > Companies > "Company Name" > Report Configuration (tab)
#2 I modified the HTML for RML header.
#3 When I previewed it within the "Report Configuration Tab" it looked CORRECT.
#4 HOWEVER, these header modifications did NOT take effect in the actual invoice.
QUESTION #3: Which of these two methods (QWeb View vs. WYSIWIG) is the proper way to edit invoices in Odoo? Or, is there another, better way to do it?
EDIT: It is correct to use either the QWeb View -or- the WYSIWIG mode. They both effect each other. I found the QWebView/HTML Editing to be the only option to get the results I wanted.
- Multiple Invoice Templates
I would like to have two different invoice templates that appear when selecting "Print" from the drop down menu. I am not sure the correct way to do this. I did try duplicating the "Invoices" item under Settings > Reports. The new item did not appear under the "Print" menu so I assume I am not doing this correctly.
QUESTION #4: What are the proper steps to create multiple invoice templates that can be utlized via the "Print" menu?