Help

2

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

Avatar
JC

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?

Avatar
Discard
2 Answers
0
Best Answer

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
Avatar
Discard
-1
Avatar
Daniel
Best Answer

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.

Avatar
Discard