10 Answers
Are you aware that the latest version of Odoo comes with a QWeb report engine that allows WYSIWYG edition just like for the CMS website builder? It sounds like this is what you are looking for. Create an Odoo Online account and check it out.
Here is how to test it (you must be on v7-SaaS4 or later so I recommend to try it on Odoo Online):
- First you have to know that the new QWeb engine allows to output PDF or HTML. It is only when the output is HTML that it can be modified in a WYSIWYG fashion.
- Let's assume the Sales module is installed on a fresh Odoo instance. By default, the output of a quotation document is PDF, you can test that by printing a quotation. We want to change this.
- Make sure your user has the technical feature checkbox checked and the 'website' module installed. Then go to Settings > Technical > Reports > Reports, then search "sale.order" and enter the record.
- Edit the Report Type from PDF to HTML, then Save.
- Go back to the Sales app and print a quotation.
- A popup appear (or your popup-blocker will notify you). You will see the quotation in that popup and a black bar at the top with the Edit button. You need to make sure you have the access right to edit this so I recommend you do this test as an admin.
- From there, it's pretty straightforward. You edit whatever you want. You have to realize that there are 2 types of edition on a record like this: editing this particular record, or editing the quotation template which will have an impact on all records. For example, if you edit a header, it will be a template edition.
Hi, Your solution seems exactly what i am looking for. Unfortunatly, after changind the pdf to html, when I print a quotation I get this error message: Uncaught SyntaxError: Unexpected end of input https://adret.odoo.com/web?#id=4&view_type=form&model=sale.order&menu_id=304&action=378:0 What did I miss? Thanks for your help
Thanks for this. I was began to think that odoo has released de 8 version in early dev stage. This is a great great improvement. Thank you for taking your time to explain this. Regards PS: As GrupoCiTEC has mentioned you need to have the Web Designer module to be able to edit the html. Perhaps editing your answer would be great.
Hello Fabrice, I just pulled the latest v8 and the instructions that you provided do not work, nothing happens and nothing is noted in the log, I can get to a report by using the url e.g.http://localhost:8069/report/html/account.report_invoice/1 but not from the print menu? Is this still in development? TX ER
Hi,
I tried to change the layout (move boxes and delete lines), but I'm only able to delete text.
I use the odoo "Version 8.0" installed while using the script:
https://github.com/aschenkels-ictstudio/openerp-install-scripts/blob/master/odoo-v8/ubuntu-14-04/odoo_install.sh
Example, I try to move the customer address from right page site to the left. But I'm not able to do that. I see the "edit" button, and I see in the pull down menu "customize content".
My question, How can I change the layout totally free for printing a pdf report, in this case a invoice? Is ther a complete How to for beginners? I'm not a developer :-) But I'm able to edit HTML and CSS.
Thanks a lot for help
Stefan
HI,
can it be, that this function is not given correctly at the latest Odoo v9 ?
I can change the report print view from PDF to HTML and open the report. Then it's possible to change some text, but i cannot move/delete/add snippets on this report like website builder.
The left toolbar (from websuite builder) just pop in for a 1/10 second and then pop out. No change to become back the toolbar.
I've seen this on a youtube video and i think thats a great tool to edit the reports.
Thank you
Marco
Thank you very much, Fabrice! This helps me very much to estimate how to proceed!
At the moment, I have a custom module with 3 different customized rml report templates inside. As I use OpenERP/Odoo Community Version and have some custom modules which also change data models (res.partner where I added some additional fields to), I will need a bit of time to upgrade to v8, because data migration will not be too easy-going. But in the meantime, I could try to convert my .rml templates to HTML code what I think to be not too easy-going, too, but I suppose or hope it will be possible. If not, I have to take the predesigned webkit templates and modify them within v8 to approach my current .rml layout. For that purpose, the information you gave above will be very helpful to me. Maybe I will try like that first. Then I can change to webkit within my v7, install new custom webkit report module designed by the help of v8, copy modified header code where it belongs to (maybe it can also be placed to my custom module - up to now, I have not found out, how to) and my webkit migration should be finished. Whenever I need to change layout, I can do this using v8 till time will have come to change to v8 entirely.
Hi,
Do you know if this is possible to edit localy the document when you are on the html editor then save it as pdf ?
So i need to have the normal template of the sale order (for instance) then i would like edit it just before sending it to the customer (or save it as pdf) without edit the template used each time a generate a sale order...
As we are discussing the layout of the reports here, I want to ask my question here.
Is there a way (a WYSIWYG way) to edit external_layout_footer and external_layout_header?
I have tried editing it inside a report (with the way explained here) , but when I save it, the header becomes totally different. I don't think this is the right way to edit this.
I know how to edit the header and footer in code mode by the way.
Has there been some change here in the latest 8.0rc1 branch? The edit button comes up disabled here...
Thank you Fabrice, your guide is clear and very helpful, but how can i modify the html templates ? for more technicals customization like adding an amount_to_text field ?
@mohsel, i've been doing some custom work on the saleorder, invoice, and other documents by adding the customisations to a custom module thanks to the tips from Fabrice on QWeb. Please provide some more information on what exactly you'd like to achieve in regards to customisations and i'd be happy to provide you with whatever information I can to help.