This commit is contained in:
2026-01-27 22:50:34 +01:00
parent fabc380784
commit f6fe3fb2bd

View File

@@ -387,6 +387,7 @@ class AutomationDocument(ModelSQL, ModelView, Workflow):
weight_total = sum([l.lot_quantity for l in sale_line.lots if l.lot_type == 'physic']) weight_total = sum([l.lot_quantity for l in sale_line.lots if l.lot_type == 'physic'])
factor = weight_total / wr.net_landed_kg if wr.net_landed_kg else 1 factor = weight_total / wr.net_landed_kg if wr.net_landed_kg else 1
for lot in sale_line.lots: for lot in sale_line.lots:
if lot.lot_type == 'physic':
wr_payload = { wr_payload = {
"chunk_key": lot.lot_chunk_key, "chunk_key": lot.lot_chunk_key,
"gross_weight": round(lot.lot_gross_quantity / factor,5), "gross_weight": round(lot.lot_gross_quantity / factor,5),