CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
So, I went into Warehouse->Configuration->Units of Measure because I need boxes that contain 10, 12, 20, 25, 50, 65, and 100 units.
All of these worked correctly except for the box of 65.
When I try to create a new UoM I name it Box of 65 , chose Unit as its category, selected Bigger than the referenced bla bla, and then when I select the ratio as 65, when I save it the ratio immediately changes to 64.999999998375. Now, this wouldnÂ´t be a problem by itself but when I try to export the OuM specifically uom_po_id/id instead of giving me the value for this UoM it gives me "product.product_uom_unit" which I believe is the model but that is not something I can use to import information back into the DB.
Does anyone have any idea why this is happening and how to make it work, is it because the number is odd?
The reason for such a behaviour is that only one "master" conversion factor for each UoM (with a decimal precision of 12 digits) is stored, and that factor is the "smaller than" ratio. So for eg when you configure a UoM that is 1609.34 times bigger than the reference UoM, the system stores that it is 1/1609.34 times smaller, i.e. 0.0006213727366498068 smaller, rounded to 12 digits as 0.000621372737.
What is displayed in the ratio when you choose "bigger than" is computed on-the-fly as the inverse of that master factor... so it leads to a small difference. It is not a big issue because 1609.339999093008 is not stored nor used anywhere in the system; all UoM conversions will work as expected based on the 0.000621372737 ratio, because everything is rounded afterwards to an appropriate decimal accuracy.
About This Community
Odoo Training Center
|Asked: 1/10/14, 8:03 PM|
|Seen: 1542 times|
|Last updated: 3/16/15, 8:10 AM|