[IMP] Remove unnecessary code

This commit is contained in:
Haresh Chavda 2018-02-08 10:04:47 +05:30
parent 75b675cb95
commit c71b512ea1

View File

@ -117,8 +117,6 @@ class AccountInvoice(models.Model):
@api.onchange('discount_amount') @api.onchange('discount_amount')
def onchange_discount_amount(self): def onchange_discount_amount(self):
if self.discount_method == 'per':
return True
values = self.get_maximum_per_amount() values = self.get_maximum_per_amount()
if self.discount < 0: if self.discount < 0:
raise Warning(_("Discount should be less than Gross Amount")) raise Warning(_("Discount should be less than Gross Amount"))