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_variant_hs_code

View 19.0 View 20.0
Inputs Method Outputs
  • product_variant_count
  • product_variant_id
  • product_variant_id.hs_code
+ for template in self:
+             if template.product_variant_count == 1:
+                 template.hs_code = template.product_variant_id.hs_code
+             else:
+                 template.hs_code = False
  • hs_code

Back to entity