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

Module: Manufacturing

Entity: product.template

Compute Method: _compute_mrp_product_qty

View 17.0 View 20.0
Inputs Method Outputs
  • uom_id
  • uom_id.rounding
for template in self:
-             template.mrp_product_qty = float_round(sum(template.mapped('product_variant_ids').mapped('mrp_product_qty')), precision_rounding=template.uom_id.rounding)
+             template.mrp_product_qty = template.uom_id.round(sum(template.mapped('product_variant_ids').mapped('mrp_product_qty')))
  • mrp_product_qty

Back to entity