Skip to content

Commit

Permalink
[FIX] test for refund base on amount total not amount untaxed
Browse files Browse the repository at this point in the history
  • Loading branch information
vrenaville committed Jul 24, 2017
1 parent e2a2557 commit 06db34a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/sale/sale.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,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 06db34a

Please sign in to comment.