Skip to Content
Menu
This question has been flagged
1 Odpoveď
1688 Zobrazenia

Even after making the adjustment to the decimal precision of the Product Unit of Measure, setting it to 3, I'm still running into the issue where the weight on the POS UI shows 3 decimal places but continues to be rounded to only 2 decimal places, basically adding an extra 0 on the third decimal place. 

For instance, if the input is 0.236, the user interface will display 0.240 kg.


Any ideas on how to fix this?

Edit: I found the rounding precision field on the unit of measure config :)

Avatar
Zrušiť

I'm trying to do the same thing. Please let me know exactly how you got this to work.

Best Answer

First of all:

Warning for Product Unit of Measure
The precision has been reduced for Product Unit of Measure.
Note that existing data WON'T be updated by this change.

As decimal precisions impact the whole system, this may cause critical issues.
E.g. reducing the precision could disturb your financial balance.

Therefore, changing decimal precisions in a running database is not recommended.

This means, while some Decimal Accuracy settings can be reverted, doing so may have unwanted side effects!

Thus, ensure this change actually works for you and does what you expect it to do in a test environment prior to changing your production environment (i.e.  in your test/staging environment, or at least in runbot.odoo.com)!


In any case, when the following is your situation:

You enter a Quantity of 0.236 and Odoo rounds it to 0.24 (or 0.240 in case you've increased the Decimal Accuracy* already)


... and instead you want it to actually reflect your input of 0.236:



*) Setting/increasing Decimal Accuracy:

Enable Developer Mode (see https://www.odoo.com/documentation/18.0/applications/general/developer_mode.html), then navigate to Settings -> Technical -> Database Structure --> Decimal Accuracy. From the list, find the record Product Unit of Measure and change Digits to 3 (note: trying to revert this back to a lower accuracy is what will return initially mentioned warning!). This will result in an output of 0.240 instead of 0.24.


Use higher precision for Units of Measure:

Then, in order to actually use a higher precision, navigate to Settings again and search for 'Units of Measure' (depending on the Apps installed this may return multiple results):

Here, click the Units of Measure link and open the Units of Measure Category of the Unit of Measure that needs a higher precision, i.e. 'Unit' in above example, and set the Rounding Precision accordingly (here, change it from 0.01 to 0.001):


Once saved, a new POS session (close and reopen the POS session) should allow you to use higher precision on Products using this Unit of Measure.

Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
1
jan 23
3366
1
aug 25
873
1
júl 25
1106
3
júl 25
3809
3
máj 25
1998