Odoo Help

2

How to change eg. quantity of 50.0000 to 50 in qWeb invoice?

By
JC
on 4/4/16, 2:50 AM 568 views

When unit in invoice has 4 decimal eg.  it can be 9.9999 but when no decimal I wish to print without .0000 how can I change qweb report  for this?

0
Jusab Sida (jsi)
On 6/15/17, 8:53 AM

For that you can do like:

.........
    <t t-if="round(l.quantity) == l.quantity">
    <span t-esc="'%.0f' % l.quantity"/>
</t>
<t t-if="not round(l.quantity) == l.quantity">
    <span t-field="l.quantity"/>
</t>
........
Question is too old...but just for ref
-1
Daniel
On 4/4/16, 3:29 AM

Login with admin privilege, 1 Activate Technical Mode, 2 Refresh the web page, 3 Navigate to Technical section, 4 Click on Database Structure, 5 Click on Decimal Accuracy, 6 You should see Product Unit of Measure, 7 Click on it, 8 Click on Edit, 9 Change the Value to 1 from 4 then save.

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 E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 4/4/16, 2:50 AM
Seen: 568 times
Last updated: 6/15/17, 9:00 AM