Do not convert invoiced quantity if sale has not unit when computing credit amount
Closes #13715 (grafted from a544d1b5b342dde5f2ace14eab375dd7f0a63b6a) --HG-- branch : 7.0
This commit is contained in:
1 parent
46945090ea
commit
a1f477ec54
1 file changed
+7
-3
@@ -40,9 +40,13 @@ class Party(metaclass=PoolMeta):
|
||||
continue
|
||||
invoice = invoice_line.invoice
|
||||
if invoice and invoice.move:
|
||||
quantity -= Uom.compute_qty(
|
||||
invoice_line.unit, invoice_line.quantity,
|
||||
line.unit, round=False)
|
||||
if line.unit:
|
||||
quantity -= Uom.compute_qty(
|
||||
invoice_line.unit or line.unit,
|
||||
invoice_line.quantity,
|
||||
line.unit, round=False)
|
||||
else:
|
||||
quantity -= invoice_line.quantity
|
||||
if quantity > 0:
|
||||
amount += Currency.compute(
|
||||
sale.currency,
|
||||
|
||||
Reference in new issue
Block a user