This commit is contained in:
2026-01-27 18:45:09 +01:00
parent 3846932517
commit 431062f123

View File

@@ -237,6 +237,7 @@ class AutomationDocument(ModelSQL, ModelView, Workflow):
logger.info("ROW:%s",row)
#Purchase & Sale creation
LotQt = Pool().get('lot.qt')
Lot = Pool().get('lot.lot')
LotAdd = Pool().get('lot.add.line')
Currency = Pool().get('currency.currency')
Product = Pool().get('product.product')
@@ -270,6 +271,8 @@ class AutomationDocument(ModelSQL, ModelView, Workflow):
if lq.lot_p:
logger.info("VLOT_P:%s",lq.lot_p)
lq.lot_p.updateVirtualPart(round(lot_net_weight,2),sh[0],lq.lot_s)
vlot.set_current_quantity(round(lot_net_weight,2),round(lot_gross_weight,2),1)
Lot.save([vlot])
else:
sale = Sale()
sale_line = SaleLine()