main #7

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

View File

@@ -337,18 +337,18 @@ class AutomationDocument(ModelSQL, ModelView, Workflow):
) )
#Lots creation #Lots creation
vlot = sale_line.lots[0] # vlot = sale_line.lots[0]
lqt = LotQt.search([('lot_s','=',vlot.id)]) # lqt = LotQt.search([('lot_s','=',vlot.id)])
if lqt and vlot.lot_quantity > 0: # if lqt and vlot.lot_quantity > 0:
lqt = lqt[0] # lqt = lqt[0]
l = LotAdd() # l = LotAdd()
l.lot_qt = lot_bales # l.lot_qt = lot_bales
l.lot_unit = Uom.get_by_name('bale') # l.lot_unit = Uom.get_by_name('bale')
l.lot_unit_line = lot_unit # l.lot_unit_line = lot_unit
l.lot_quantity = round(lot_net_weight,2) # l.lot_quantity = round(lot_net_weight,2)
l.lot_gross_quantity = round(lot_gross_weight,2) # l.lot_gross_quantity = round(lot_gross_weight,2)
l.lot_premium = premium # l.lot_premium = premium
LotQt.add_physical_lots(lqt,[l]) # LotQt.add_physical_lots(lqt,[l])