Comment 4 for bug 1266664

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

Hello again,
Still testing, but in the module product cost_incl_bom is where the problem lies. When it calculated the cost for the BOM line, the quantity was divided by uom_po_id, not the uom_id. I changed both fields in product_cost_incl_bom.py to:

###### eagerly read all the dependencies products - REPLACE uom_po_id WITH uom_id
        sub_read = self.read(cr, uid,
                             list(chain.from_iterable(depends.itervalues())),
LINE 168 - ['cost_price', 'uom_po_id'], context=context)
                                         + ['cost_price', 'uom_id'], context=context)

AND

LINE 206 ####replace uom_po_id WITH uom_id
                    to_uom_id=subproduct['uom_id'][0])
                cost += subcost * qty