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_multi_product
| Inputs | Method | Outputs |
|---|---|---|
|
for reward in self: - products = reward.reward_product_id + reward.reward_product_tag_id.product_ids - reward.multi_product = reward.reward_type == 'product' and len(products) > 1 - reward.reward_product_ids = reward.reward_type == 'product' and products or self.env['product.product'] + products = reward.reward_product_id + reward.reward_product_tag_id.product_ids.filtered( + lambda product: product.type != "combo" + ) + reward.multi_product = reward.reward_type == "product" and len(products) > 1 + reward.reward_product_ids = (reward.reward_type == "product" and products) or self.env[ + "product.product" + ] |
|
