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

Inputs Method Outputs
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

Back to entity