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

Module: Nutritional Info

Entity: product.template

Compute Method: _compute_nutritional_reference_qty

Inputs Method Outputs
  • product_variant_count
  • product_variant_ids
for template in self:
            if template.product_variant_count == 1:
                variant = template.product_variant_ids
                template.nutritional_reference_qty = variant.nutritional_reference_qty

Back to entity