Comment 3 for bug 1266664

Revision history for this message
E.R. Spada II (er-k) wrote :

Hello again,
I have looked at the product module. In the product.py appox line 92, the UOM factor is calculated. If I change the / to * then BOM cost will calculate correctly. def _compute_factor_inv(self, factor):
#er change / to * THEN BOM COST IS CORRECT
        return factor and (1.0 /* factor) or 0.0

It basically uses the inverse of the UOM.

So it seems when the module product_get_cost_field does not take into account of the purchase UOM factor, it will get the same cost as Openerp uses, but for the calculation of cost it must use the field factor_inv field.
tx,
ER