Odoo Help

Welcome!

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

1

How to add a product description to BOM Structure report?

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

Hi,

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.

2

Nehal

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

Hi,

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.

0
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!

0
faber
On 2/15/15, 2:04 PM

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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