Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Point of Sale - Coupons & Loyalty
Entity: loyalty.rule
Compute Method: _compute_valid_product_ids
| Inputs | Method | Outputs |
|---|---|---|
|
|
for key, rules in self.grouped(lambda rule: (
tuple(rule.product_ids.ids),
rule.product_category_id.id,
rule.product_tag_id.id,
'' if rule.product_domain in ('[]', "[['sale_ok', '=', True]]") else rule.product_domain,
)).items():
if any(key):
- domain = expression.AND([[('available_in_pos', '=', True)], rules[:1]._get_valid_product_domain()])
+ domain = Domain.AND([[('available_in_pos', '=', True)], rules[:1]._get_valid_product_domain()])
rules.valid_product_ids = self.env['product.product'].search(domain, order="id")
rules.any_product = False
else:
rules.valid_product_ids = self.env['product.product']
rules.any_product = True
|
|
