Wrong Gross profit calculation in sales order

Hello,

I have an item with UOM is “UNIT” and for sales is BOX. 1 BOX = 4 UNITS

When I create sales order, the price is shown correctly but the gross margin is calculated wrongly. But When I extend the line and I change the UOM to UNIT then return it to BOX it will calculation will be correct. I notice also when a field “Rate of Stock UOM” appear the calculation is correct.

I checked the child table “Sales Order Item” in Sales Order Form and I found in depend on parameter of the field “stock_uom_rate” the following “eval: doc.uom != doc.stock_uom”, but it’s not working until I change manually the UOM.

However the gross profit report shows a correct values even if in the order is wrong.

Could you help me to solve this.

Thanks




1 Like