[MERGE] forward port branch saas-11.1 up to 16ddd0216ee
This commit is contained in:
@@ -32,3 +32,8 @@ class SaleCouponRule(models.Model):
|
||||
def _check_rule_minimum_amount(self):
|
||||
if self.filtered(lambda applicability: applicability.rule_minimum_amount < 0):
|
||||
raise ValidationError(_('Minimum purchased amount should be greater than 0'))
|
||||
|
||||
@api.constrains('rule_min_quantity')
|
||||
def _check_rule_min_quantity(self):
|
||||
if not self.rule_min_quantity > 0:
|
||||
raise ValidationError(_('Minimum quantity should be greater than 0'))
|
||||
|
||||
Reference in New Issue
Block a user