Odoo Help


How can I remove the product_id under the product description on the report_saleorder_document?

Jason Wu
on 12/19/14, 2:23 AM 1,519 views

Please help ...

<tbody class="sale_tbody">
                    <tr t-foreach="o.order_line" t-as="l">
                            <span t-field="l.name" />     


l.name include product_id .how can format ? i only want product  description 

Can you post the detailed info about this please. Because i have checked this, It is displaying correctly for me...

on 12/20/14, 5:32 AM

I can not post pictures of information, karma is not enough Structure can only express in words on my report sales.order.line information: product description [iMac] [iMac] 16G,White,Wifi, i don't want [iMac] on description !!

Jason Wu
on 12/20/14, 12:15 PM


| 6 5 7
Lodz, Poland

On 12/20/14, 7:05 AM

Line name include "Internal Reference" = default_code from product (not product_id). If you want to change it you need to override method name_get() from product.product. Another way is to set the display_default_code = False in context. The easiest way is to replace the line <span t-field="l.name" />  and insert

<span t-esc="l.name[l.name.find('] ')+2:]"/>  

will cut the string to chars '] '


Laurent ROCHE
On 6/11/15, 10:34 AM

I've replaced the line

<span t-field="l.name" />


<span t-esc="l.name[l.name.find('] ')+2:]"/>

That works ... nearly: the line break in my sales description are removed.

I don't know what to do to get this working. I would like to "set the display_default_code = False in context " ... but I don't know how.

I am using the Saas version so it's unlikely I am able to override method name_get() from product.product.

Hopefully, someone will have a solution for me.


Jason Wu
On 12/21/14, 7:51 PM



Thank you for your answer, I have followed your way to complete the correction.

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

3 follower(s)


Asked: 12/19/14, 2:23 AM
Seen: 1519 times
Last updated: 6/11/15, 11:51 AM