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: stock.move

Compute Method: _compute_should_consume_qty

View 17.0 View 19.0
Inputs Method Outputs
  • raw_material_production_id
  • product_uom
  • unit_factor
  • product_uom.rounding
for move in self:
            mo = move.raw_material_production_id
            if not mo or not move.product_uom:
                move.should_consume_qty = 0
                continue
-             move.should_consume_qty = float_round((mo.qty_producing - mo.qty_produced) * move.unit_factor, precision_rounding=move.product_uom.rounding)
+             move.should_consume_qty = move.product_uom.round((mo.qty_producing - mo.qty_produced) * move.unit_factor)
  • should_consume_qty

Back to entity