Only update actual quantity when it has changed

issue9541
review294321002
This commit is contained in:
Sergi Almacellas Abellana committed 2020-10-04 23:54:51 +02:00
1 parent 4f0a3d04a0
commit b174064698
1 file changed
+3 -1
+3 -1
View File
@@ -1636,7 +1636,9 @@ class SaleLine(sequence_ordered(), ModelSQL, ModelView):
or invoice_line.invoice.state != 'cancelled'):
invoiced_quantity += Uom.compute_qty(
invoice_line.unit, invoice_line.quantity, self.unit)
self.actual_quantity = max(moved_quantity, invoiced_quantity, key=abs)
actual_quantity = max(moved_quantity, invoiced_quantity, key=abs)
if self.actual_quantity != actual_quantity:
self.actual_quantity = actual_quantity
def get_rec_name(self, name):
pool = Pool()