Skip to content

Commit

Permalink
Merge pull request #840 from leemannd/vrenaville-amount_taxed_sale_to…
Browse files Browse the repository at this point in the history
…_invoice

[9.0] [FIX] test for refund base on amount total not amount untaxed
  • Loading branch information
pedrobaeza committed Mar 21, 2019
2 parents 61edcc6 + 06db34a commit 53de748
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/sale/sale.py
Expand Up @@ -346,7 +346,7 @@ def action_invoice_create(self, grouped=False, final=False):
if not invoice.invoice_line_ids:
raise UserError(_('There is no invoicable line.'))
# If invoice is negative, do a refund invoice instead
if invoice.amount_untaxed < 0:
if invoice.amount_total < 0:
invoice.type = 'out_refund'
for line in invoice.invoice_line_ids:
line.quantity = -line.quantity
Expand Down

0 comments on commit 53de748

Please sign in to comment.