Odoo Help


How to add a product description to BOM Structure report?

Alex Gallien
on 5/13/14, 6:42 PM 1,629 views


I am trying to add a the product description field to my BOM Structure report (using the OpenOffice plugin), but can't figure out how to reference it. I am specifically referring to the large text field when editing a product under the "Information" tab. With developer tools on it says:

Field: description
Object: product.product
Type: text

It seems like [[ repeatIn(get_children(o.bom_lines), 'l') ]] is defining each product in the BOM line as 'l', so I tried putting in (l.description), (l.product.description), l['description'], and a few other variants, to no avail. Does anyone know the correct way to reference this? Or any references I could use to understand the syntax here better? Thanks.




| 5 2 8
Ahmadabad, India
On 5/14/14, 2:06 AM


For getting description of bom_lines, you need to add following : get_children method of mrp/report/bom_structure.py file:

res['pname'] = l.product_id.name # already there
res['pdesc'] = l.product_id.description  # add this line

Then in your rml file you can get description by adding following line:

<para style="terp_default_9">[ [[ (l['pdesc']) ]] ]</para>

Hope this may solve your issue.

Alex Gallien
On 5/14/14, 1:31 PM

That's exactly it Nehal, thank you so much. I should have looked deeper in the /mrp/ folder. Cheers!

On 2/15/15, 2:04 PM

This method does not work in ODOO8, and look forward to solutions.

About This Community

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


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 5/13/14, 6:42 PM
Seen: 1629 times
Last updated: 3/16/15, 8:10 AM