Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Coupons & Loyalty

Entity: loyalty.reward

Compute Method: _compute_all_discount_product_ids

Inputs Method Outputs
compute_all_discount_product = (
            self
            .env["ir.config_parameter"]
            .sudo()
            .get_bool("loyalty.compute_all_discount_product_ids", True)
        )
for reward in self:
            if compute_all_discount_product:
                reward.all_discount_product_ids = self.env["product.product"].search(
                    reward._get_discount_product_domain()
                )
            else:
                reward.all_discount_product_ids = self.env["product.product"]

Back to entity