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

Module: Products & Pricelists

Entity: product.template

Compute Method: _compute_uom_po_id

View 17.0 View 18.0
Inputs Method Outputs
  • uom_po_id
  • uom_id
  • uom_id.category_id
  • uom_po_id.category_id
for template in self:
            if not template.uom_po_id or template.uom_id.category_id != template.uom_po_id.category_id:
                template.uom_po_id = template.uom_id
  • uom_po_id

Back to entity