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

Module: Delivery - Stock

Entity: product.template

Compute Method: _compute_country_of_origin

Inputs Method Outputs
  • product_variant_count
  • product_variant_id
  • product_variant_id.country_of_origin
for template in self:
            if template.product_variant_count == 1:
                template.country_of_origin = template.product_variant_id.country_of_origin
            else:
                template.country_of_origin = False

Back to entity