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])
doc.notes = (doc.notes or "") + f"Shipment found: {sh[0].number}\n"
logger.info("BL_NUMBER:%s",sh[0].bl_number)
sale_line = sh[0]._create_lots_from_fintrade()
if sale_line:
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'])
if sh[0].incoming_moves:
weight_total = sum([m.lot.lot_quantity for m in sh[0].incoming_moves if m.lot.lot_type == 'physic'])
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':
wr_payload = {
"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"/>
<newline/>
<label name="instructions"/>
<field name="instructions" widget="html_viewer" colspan="4" height="250"/>
<field name="instructions" widget="html_viewer" colspan="4" height="200"/>
<newline/>
<label name="returned_id"/>
<field name="returned_id"/>