This commit is contained in:
2026-01-27 16:45:55 +01:00
parent 842a2b1da6
commit 870f2e93f4

View File

@@ -244,11 +244,11 @@ class AutomationDocument(ModelSQL, ModelView, Workflow):
Uom = Pool().get('product.uom')
Sale = Pool().get('sale.sale')
SaleLine = Pool().get('sale.line')
dec_key = str(row[16]).strip()
lot_unit = str(row[5]).strip().lower()
product = str(row[6]).strip().upper()
lot_net_weight = Decimal(row[4])
logger.info("LOT_NET_WEIGHT:%s",lot_net_weight)
lot_gross_weight = Decimal(row[3])
lot_bales = int(row[2])
lot_number = row[1]
@@ -265,9 +265,9 @@ class AutomationDocument(ModelSQL, ModelView, Workflow):
logger.info("WITH_DEC:%s",sale_line)
vlot = sale_line.lots[0]
lqt = LotQt.search([('lot_s','=',vlot.id)])
if lqt:
lqt[0].lot_s.updateVirtualPart(round(lot_net_weight,2),sh[0],lqt[0].lot_s,'only sale')
logger.info("WITH_DEC_LOT_NET:%s",lot_net_weight)
if lqt and lqt[0].lot_p:
logger.info("VLOT_P:%s",lqt[0].lot_p)
lqt[0].lot_p.updateVirtualPart(round(lot_net_weight,2),sh[0],lqt[0].lot_s)
else:
sale = Sale()
sale_line = SaleLine()