Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Purchase

Entity: purchase.order.line

Compute Method: _compute_product_uom_qty

Inputs Method Outputs
for line in self:
            if line.product_id and line.product_id.uom_id != line.uom_id:
                line.product_uom_qty = line.uom_id._compute_quantity(line.product_qty, line.product_id.uom_id)
            else:
                line.product_uom_qty = line.product_qty

Back to entity