diff --git a/loyalty_criteria_multi_product/models/loyalty_rule.py b/loyalty_criteria_multi_product/models/loyalty_rule.py index f54c906f..c8c861ea 100644 --- a/loyalty_criteria_multi_product/models/loyalty_rule.py +++ b/loyalty_criteria_multi_product/models/loyalty_rule.py @@ -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 diff --git a/loyalty_criteria_multi_product/views/loyalty_rule_views.xml b/loyalty_criteria_multi_product/views/loyalty_rule_views.xml index 70d0b9d0..244c8465 100644 --- a/loyalty_criteria_multi_product/views/loyalty_rule_views.xml +++ b/loyalty_criteria_multi_product/views/loyalty_rule_views.xml @@ -9,6 +9,21 @@ name="attrs" >{'invisible': [('loyalty_criteria', '!=', 'domain')]} + + {'invisible': [('loyalty_criteria', '!=', 'domain')]} + + +
+ {'invisible': [('loyalty_criteria', '!=', 'domain')]} +