diff --git a/modules/automation/automation.py b/modules/automation/automation.py
index a7da6bc..870eda5 100644
--- a/modules/automation/automation.py
+++ b/modules/automation/automation.py
@@ -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,
diff --git a/modules/purchase_trade/view/shipment_in_form.xml b/modules/purchase_trade/view/shipment_in_form.xml
index 599f398..6116510 100755
--- a/modules/purchase_trade/view/shipment_in_form.xml
+++ b/modules/purchase_trade/view/shipment_in_form.xml
@@ -125,7 +125,7 @@ this repository contains the full copyright notices and license terms. -->
-
+