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.product

Compute Method: _compute_variant_item_count

View 18.0
Inputs Method Outputs
  • product_tmpl_id
  • product_tmpl_id.id
  • id
- for product in self:
-             domain = [
-                 ('pricelist_id.active', '=', True),
-                 '|',
-                     '&', ('product_tmpl_id', '=', product.product_tmpl_id.id), ('applied_on', '=', '1_product'),
-                     '&', ('product_id', '=', product.id), ('applied_on', '=', '0_product_variant'),
-                 ('compute_price', '=', 'fixed'),
-             ]
-             product.pricelist_item_count = self.env['product.pricelist.item'].search_count(domain)
  • pricelist_item_count

Back to entity