Skip to content

Commit

Permalink
Merge PR #229 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Nov 19, 2024
2 parents cfc47e1 + 3c1dbf0 commit 07ffdae
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions loyalty_criteria_multi_product/models/loyalty_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ class LoyaltyRule(models.Model):
def _onchange_loyalty_criteria(self):
"""Clear domain so we clear some other fields from the view"""
if self.loyalty_criteria == "multi_product":
self.minimum_amount = 0.00
self.product_domain = False
self.product_ids = False
self.product_category_id = False
self.product_tag_id = False
else:
self.loyalty_criteria_ids = False
15 changes: 15 additions & 0 deletions loyalty_criteria_multi_product/views/loyalty_rule_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,21 @@
name="attrs"
>{'invisible': [('loyalty_criteria', '!=', 'domain')]}</attribute>
</field>
<field name="minimum_amount" position="attributes">
<attribute
name="attrs"
>{'invisible': [('loyalty_criteria', '!=', 'domain')]}</attribute>
</field>
<label for="minimum_amount" position="attributes">
<attribute
name="attrs"
>{'invisible': [('loyalty_criteria', '!=', 'domain')]}</attribute>
</label>
<div class="d-flex flex-row" position="attributes">
<attribute
name="attrs"
>{'invisible': [('loyalty_criteria', '!=', 'domain')]}</attribute>
</div>
<field name="product_domain" position="attributes">
<attribute
name="attrs"
Expand Down

0 comments on commit 07ffdae

Please sign in to comment.