Merge branch 'master-sale-account-discount' into 'master'

[IMP] Remove unnecessary code

See merge request flectra-hq/flectra!23
This commit is contained in:
Parthiv Patel 2018-02-08 09:04:37 +00:00
commit 5d8eb4fb9f

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"))