main #7

Merged
admin merged 620 commits from main into dev 2026-03-29 13:03:25 +00:00
Showing only changes of commit c349441874 - Show all commits

View File

@@ -126,7 +126,7 @@ class Fee(ModelSQL,ModelView):
line = self.sale_line line = self.sale_line
if line: if line:
if line.lots: 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 unit = line.lots[0].lot_unit_line
logger.info("ON_CHANGE_WITH_QT0:%s",qt) logger.info("ON_CHANGE_WITH_QT0:%s",qt)
if self.shipment_in: if self.shipment_in:
@@ -134,7 +134,7 @@ class Fee(ModelSQL,ModelView):
lots = Lot.search([('lot_shipment_in','=',self.shipment_in.id)]) lots = Lot.search([('lot_shipment_in','=',self.shipment_in.id)])
logger.info("ON_CHANGE_WITH_LOTS:%s",lots) logger.info("ON_CHANGE_WITH_LOTS:%s",lots)
if 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 unit = lots[0].lot_unit_line
if not qt: if not qt:
logger.info("ON_CHANGE_WITH_QT1:%s",qt) logger.info("ON_CHANGE_WITH_QT1:%s",qt)