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

Module: Product logistics UoM

Entity: product.template

Compute Method: _compute_product_volume

Inputs Method Outputs
  • product_variant_count
  • product_variant_ids
  • product_variant_ids.product_volume
for template in self:
            template.product_volume = (
                template.product_variant_ids.product_volume
                if template.product_variant_count == 1
                else 0.0
            )

Back to entity