(5.0) Inventory level wrong when purchase UoM different from default UoM
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Real and viritual stock levels are wrong when UoM in stock move is not default UoM.
To reproduce:
OpenERP V5.0.6
New database with profile manufacturing
Create UoM M, category Length, Rate:1
Create UoM 700M, category Length, Rate: 700
Create product "Test" with Default UoM: M, Purchase UoM: 700M
Create partner "Supplier"
Now:
When I buy 5 x 700 M of the product "Test" I get the correct stock move entry of Quantity:5 and UOM:700 M. However when I go into checking the real/viritual stock which is displayed using Default UoM, the system has counted 5 x M, i.e. it has booked 5 M instead of 3500 M.
The same wrong stock numbers occurs when a BOM books out materials from stock in a UOM different than the Default UoM.
Ok, the UoM was configured wrong, instead of:
Create UoM 700M, category Length, Rate: 700
it should be:
Create UoM 700M, category Length, Rate: 0.001428 (leading to a Factor of 700.28)
This however creates a rounding problem (in inventory amongst others) when ordering 1x700M
The problem is that only Rate can be specified in UoM and Factor is calculated. In some circumstances (such as 700M) it's necessary to be able to specify the Factor instead of Rate.