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

Module: Sales

Entity: sale.order.line

Compute Method: _compute_section_uom_id

View 20.0
Inputs Method Outputs
  • display_type
+ default_uom_id = self.env.ref("uom.product_uom_unit").id
+ for line in self:
+             if line.display_type in {"line_section", "line_subsection"}:
+                 line.section_uom_id = default_uom_id
+             else:
+                 line.section_uom_id = False
  • section_uom_id

Back to entity