This commit is contained in:
2026-03-13 14:58:00 +01:00
parent 73fdbe9eba
commit c349441874

View File

@@ -126,7 +126,7 @@ class Fee(ModelSQL,ModelView):
line = self.sale_line
if line:
if line.lots:
qt = sum([e.get_current_quantity() for e in line.lots])
qt = sum([e.get_current_quantity_converted(0,self.unit) for e in line.lots])
unit = line.lots[0].lot_unit_line
logger.info("ON_CHANGE_WITH_QT0:%s",qt)
if self.shipment_in:
@@ -134,7 +134,7 @@ class Fee(ModelSQL,ModelView):
lots = Lot.search([('lot_shipment_in','=',self.shipment_in.id)])
logger.info("ON_CHANGE_WITH_LOTS:%s",lots)
if lots:
qt = sum([e.get_current_quantity() for e in lots])
qt = sum([e.get_current_quantity_converted(0,self.unit) for e in lots])
unit = lots[0].lot_unit_line
if not qt:
logger.info("ON_CHANGE_WITH_QT1:%s",qt)