Skip to Content
Menú
This question has been flagged
1 Respondre
2185 Vistes

Hello,

I got this situation where I need to hide the values of a description in a particular product.
I just put another selection in Product Type that for this particular product.

Type = consumable, service, unknown and storage product

<field name="product_id"> how to make the product_id values = spaces, instead of the existing product name. 

so that in the report, the value of that particular product is blank. 


Avatar
Descartar
Best Answer

Hi William:

You can use the following syntax to conditionally print the product description.

NOTE: You will probably need the variable prefix used for the looping like doc.type or o.type depending on which report you have modified.

<t t-if="doc.type in ('consumable', 'service')">
<span t-field="doc.product_id"/>
</t>



Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de març 25
1202
0
de nov. 24
1433
0
de juny 24
1491
1
de juny 24
1983
0
d’oct. 23
2051