diff --git a/modules/automation/automation.py b/modules/automation/automation.py index 3368847..1ce42e7 100644 --- a/modules/automation/automation.py +++ b/modules/automation/automation.py @@ -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()