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

Module: Delivery Costs

Entity: sale.order.line

Compute Method: _compute_product_qty

Inputs Method Outputs
  • product_id
  • product_uom_id
  • product_uom_qty
  • product_id.uom_id
for line in self:
            if not line.product_id or not line.product_uom_id or not line.product_uom_qty:
                line.product_qty = 0.0
                continue
            line.product_qty = line.product_uom_id._compute_quantity(
                line.product_uom_qty, line.product_id.uom_id
            )

Back to entity