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

Module: Inventory

Entity: stock.quant

Compute Method: _compute_inventory_diff_quantity

View 17.0 View 19.0
Inputs Method Outputs
  • inventory_quantity
  • quantity
  • inventory_quantity_set
for quant in self:
-             quant.inventory_diff_quantity = quant.inventory_quantity - quant.quantity
+             if quant.inventory_quantity_set:
+                 quant.inventory_diff_quantity = quant.inventory_quantity - quant.quantity
+             else:
+                 quant.inventory_diff_quantity = 0
  • inventory_diff_quantity

Back to entity