This commit is contained in:
2026-02-02 18:25:39 +01:00
parent 350e41714f
commit 28789200c3
2 changed files with 5 additions and 6 deletions

View File

@@ -235,12 +235,11 @@ class AutomationDocument(ModelSQL, ModelView, Workflow):
ShipmentWR.save([swr]) ShipmentWR.save([swr])
doc.notes = (doc.notes or "") + f"Shipment found: {sh[0].number}\n" doc.notes = (doc.notes or "") + f"Shipment found: {sh[0].number}\n"
logger.info("BL_NUMBER:%s",sh[0].bl_number) logger.info("BL_NUMBER:%s",sh[0].bl_number)
sale_line = sh[0]._create_lots_from_fintrade() if sh[0].incoming_moves:
if sale_line: weight_total = sum([m.lot.lot_quantity for m in sh[0].incoming_moves if m.lot.lot_type == 'physic'])
logger.info("CREATE_FINTRADE_WR_FOR_SL:%s",sale_line)
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 move in sh[0].incoming_moves:
lot = move.lot
if lot.lot_type == 'physic': if lot.lot_type == 'physic':
wr_payload = { wr_payload = {
"chunk_key": lot.lot_chunk_key, "chunk_key": lot.lot_chunk_key,

View File

@@ -125,7 +125,7 @@ this repository contains the full copyright notices and license terms. -->
<field name="result"/> <field name="result"/>
<newline/> <newline/>
<label name="instructions"/> <label name="instructions"/>
<field name="instructions" widget="html_viewer" colspan="4" height="250"/> <field name="instructions" widget="html_viewer" colspan="4" height="200"/>
<newline/> <newline/>
<label name="returned_id"/> <label name="returned_id"/>
<field name="returned_id"/> <field name="returned_id"/>