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_is_global_discount

View 19.0 View 20.0
Inputs Method Outputs
  • reward_type
  • discount_applicability
  • discount_mode
for reward in self:
            reward.is_global_discount = (
-                 reward.reward_type == 'discount'
-                 and reward.discount_applicability == 'order'
-                 and reward.discount_mode in ['per_order', 'percent']
+                 reward.reward_type == "discount"
+                 and reward.discount_applicability == "order"
+                 and reward.discount_mode in ["per_order", "percent"]
            )
  • is_global_discount

Back to entity