Odoo Help

0

0
2 Answers
0
Fatih Piristine
2017/9/14 下午2:57

 try:

<template id="report_saleorder_document" inherit_id="sale.report_saleorder_document">
<xpath expr="//span[@t-field='l.product_uom_qty']" position="replace">
         <t t-if="int(l.product_uom) == 1"> <!-- id of Unit(s) -->
             ...
         </t>
         <t t-if="int(l.product_uom) != 1">
             ...
         </t>
</template>

0
Maxime MARAIS
2017/9/15 上午2:09

Hi F.P.

Finally I gave up for an easier solution :

<span t-if="int(l.product_uom_qty) == l.product_uom_qty" t-esc="int(l.product_uom_qty)"/>
<span t-else="" t-field="l.product_uom_qty">

After all displaying 2.0000 L is the same as 2 L. But I'll try your solution too, it may be useful.

Thanks.

1 Comment
Fatih Piristine
2017/9/15 上午4:01

there is uom_coeff column causing that 0000... have a look that one.

Ask a Question
Writer
Keep Informed
1 follower(s)
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.

Register
Odoo Training Center

Access to our eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now