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

Inputs Method Outputs
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'),
            ]
            product.pricelist_item_count = self.env['product.pricelist.item'].search_count(domain)

Back to entity