diff --git a/modules/automation/automation.py b/modules/automation/automation.py index 657c697..ffd4ccc 100644 --- a/modules/automation/automation.py +++ b/modules/automation/automation.py @@ -265,6 +265,10 @@ 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_quantity += round(lot_net_weight,2) + logger.info("QUANTITY_UPDATED:%s",lqt[0].lot_quantity) + LotQt.save(lqt) 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)