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.pricelist.item

Compute Method: _compute_applied_on

View 19.0 View 20.0
Inputs Method Outputs
  • categ_id
  • product_tmpl_id
  • product_id
+ for item in self:
+             if item.categ_id:
+                 item.applied_on = '2_product_category'
+             elif item.product_tmpl_id:
+                 item.applied_on = '0_product_variant' if item.product_id else '1_product'
+             else:
+                 item.applied_on = '3_global'
  • applied_on

Back to entity