Odooers论坛

欢迎!

该社区面向专业人士和我们产品和服务的爱好者。
分享和讨论最好的内容和新的营销理念,建立您的专业形象,一起成为更好的营销人员。


0

How to hide the producty internal reference on the printed invoice? (I did it on the SO!)

形象
odoo
1 备注
形象
丢弃
形象
odoo
-

how to do the same in Odoo v18.2? 
Want to remove For quote/SO/delivery/invoice

2 答案
0
形象
odoo
最佳答案

I have used this piece of Code  to hide the reference in the brackets [] in the qweb report layout:

<td>

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

2 注释
形象
丢弃
形象
odoo
-

Hi Alex,

Thanks for your help!

I have a checkbox in my sales orders/quotation that if checked should show internal references and if unchecked should not show internal references.

How do I edit my qweb report to reflect this condition?

形象
odoo
-

This is most elegant and simple trick I see for a very long time! Absolutely fantastic!

0
形象
odoo
最佳答案

for future users, 

and thanks to @Alex Lyngsoe, 

go to  settings->technical->actions->reports

search for quotation/order report and click the Qweb views action button

go to the report_saleorder_document view and search for the <td name="td_name"></td> line

edit the line to this <td name="td_name"><span t-esc="line.name[line.name.find('] ')+2:]"/></td>

this should fully hide your internal reference for sales orders/quotations

1 备注
形象
丢弃
形象
odoo
-

This has been really helpful. Thank you so much for sharing!!