Help

0

Modify product labels xml in Odoo

Avatar
Cristian González

I’m having several issues when trying to modify the default template of product labels. I need to add some new fields to the existing template that generates the document of product labels (and to design in with proper dimensions).

I am not able to find the xml template to modify it because I can’t find the file. This is a topic I have been researching deeply through the internet during the lasts days and all my attempts have been unsuccessful.

On the Internet, it is said that the product labels are generated using the product/report/product-label.xml and product_label.xsl:

https://www.odoo.com/es_ES/forum/ayuda-1/question/product-label-prints-only-one-variant-attribute-74684

The issue is that I can’t files these files in my Odoo installation folder (tested with both Windows and Ubuntu). These are my folder contents in Ubuntu usr/lib/python3/dist-packages/odoo/addons/product/report:

https://i.imgur.com/qkComgY.jpg

Should I create the xml and xsl files?

If so, how can I reference them? I have already tried to modify the xml file to try if the options for rendering the report change and nothing’s happens...

Here is the xml that I have been modifying (looks like it is an index of the different available reports but I haven’t found any official documentation regarding this) (note that I’ve added a number to each report title to see if something changes):

https://i.imgur.com/222T97w.jpg

And the select options are still the same, as it can be seen in the following screenshot. 

https://i.imgur.com/lzv51sA.jpg

Am I’m missing something? It looks like these templates are located somewhere else and I’m editing these files without success (and restarting the Odoo server doesn’t work either...).

I'm using Odoo v12.

Thank you for your help!

Avatar
Abbandona