Skip to Content
Menu
This question has been flagged
4 Replies
12146 Views

Hi all,

I have just installed Odoo V.8 and I wanted to try to edit the reports like stock picking or delivery note. Can anyone tell me how to do it? 

 

I have tried changing the view format to HTML so that I can edit it after I select printing the report, but when I click on saving it, it goes back to the original format. Please help.

 

Avatar
Discard
Best Answer

Find the file addons/stock/report/report_deliveryslip.xml in your odoo base installation directory.

Copy the file to where you keep your customisations & additions, and a spare place to retain the original for reference.

Edit the file to your preferences. This requires care, as the QWeb syntax is obscure, coding in XML is tricky.

Copy the file back to addons/stock/report/ overwriting the base install one, perhaps using a script, so it is repeatable.

This is a concise subset of what a custom module does when overwriting base functionality.

Run this command to refresh your changed XML in the stock module only,  to the database (which stores code as well as data)

    ./odoo-bin shell -d (your odoo database name) --update=stock

Restart odoo to activate your changes.

Answer applies to v10. Upvote this answer if it resolves your issue. Comment clearly if it does not.

Avatar
Discard
Author Best Answer

Hi Yenthe,

 

Mind explaining it to me how to do it? For example I want to edit the stock.report_picking report. How do I do it? Do I click on Search associated QWeb views and view the file from there?

Avatar
Discard

You could do it from settings > reports and then find your report which you edited. The downside however is that your changes will be lost on a module update. The best way is to do it by code in your XML file under the module.

Best Answer

You should edit the QWeb report through the XML file, as the changes will then be kept permanently. Simply find the module where your report is and go in to the views. Your .XML file for the report will be there.. modify what you want to have added, update your module & you're done!

Avatar
Discard