Do not convert invoiced quantity if sale or purchase has not unit
Closes #13593
This commit is contained in:
1 parent
9d12fbf307
commit
0e0f5f0ec6
2 files changed
+12
-6
No files matched your search
@@ -1917,9 +1917,12 @@ class Line(sequence_ordered(), ModelSQL, ModelView):
|
||||
if invoice_line.type != 'line':
|
||||
continue
|
||||
if invoice_line not in skips:
|
||||
quantity += Uom.compute_qty(
|
||||
invoice_line.unit or self.unit, invoice_line.quantity,
|
||||
self.unit)
|
||||
if self.unit:
|
||||
quantity += Uom.compute_qty(
|
||||
invoice_line.unit or self.unit, invoice_line.quantity,
|
||||
self.unit)
|
||||
else:
|
||||
quantity += invoice_line.quantity
|
||||
return quantity
|
||||
|
||||
def _get_invoice_line_moves(self):
|
||||
|
||||
@@ -1954,9 +1954,12 @@ class SaleLine(TaxableMixin, sequence_ordered(), ModelSQL, ModelView):
|
||||
if invoice_line.type != 'line':
|
||||
continue
|
||||
if invoice_line not in skips:
|
||||
quantity += Uom.compute_qty(
|
||||
invoice_line.unit or self.unit, invoice_line.quantity,
|
||||
self.unit)
|
||||
if self.unit:
|
||||
quantity += Uom.compute_qty(
|
||||
invoice_line.unit or self.unit, invoice_line.quantity,
|
||||
self.unit)
|
||||
else:
|
||||
quantity += invoice_line.quantity
|
||||
return quantity
|
||||
|
||||
def _get_invoice_line_moves(self):
|
||||
|
||||
Reference in new issue
Block a user