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

Module: Units of measure

Entity: uom.uom

Compute Method: _compute_ratio

View 17.0
Inputs Method Outputs
  • uom_type
  • factor_inv
  • factor
- for uom in self:
-             if uom.uom_type == 'reference':
-                 uom.ratio = 1
-             elif uom.uom_type == 'bigger':
-                 uom.ratio = uom.factor_inv
-             else:
-                 uom.ratio = uom.factor
  • ratio

Back to entity