-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] sale_loyalty_exclude: Avoid to select excluded products in rule…
…s and rewards The excluded products can be selected at loyalty rules and reward. This is pointless and only makes confussion because the rules and rewards would be ignored.
- Loading branch information
1 parent
b54e258
commit 30da78c
Showing
3 changed files
with
11 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
from . import loyalty_reward | ||
from . import product_template | ||
from . import sale_order |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from odoo import fields, models | ||
|
||
|
||
class LoyaltyReward(models.Model): | ||
_inherit = "loyalty.reward" | ||
|
||
reward_product_id = fields.Many2one( | ||
"product.product", string="Product", domain=[("loyalty_exclude", "=", False)] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters