summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/shipment_group.py
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_custom/models/shipment_group.py')
-rw-r--r--indoteknik_custom/models/shipment_group.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/indoteknik_custom/models/shipment_group.py b/indoteknik_custom/models/shipment_group.py
index 87d222a6..fcde39c9 100644
--- a/indoteknik_custom/models/shipment_group.py
+++ b/indoteknik_custom/models/shipment_group.py
@@ -19,11 +19,13 @@ class ShipmentGroup(models.Model):
def sync_api_shipping(self):
for rec in self.shipment_line:
- if rec.shipment_id.carrier_id == 173:
- rec.picking_id.action_get_kgx_pod()
-
- if rec.shipment_id.carrier_id == 151:
- rec.picking_id.track_envio_shipment()
+ picking_names = [lines.picking_id.name for lines in self.shipment_line]
+ if rec.shipment_id.carrier_id.id == 173:
+ rec.picking_id.action_get_kgx_pod(
+ shipment=f"{self.number}, {', '.join(picking_names)}"
+ )
+ elif rec.shipment_id.carrier_id.id == 151:
+ rec.picking_id.track_envio_shipment(shipment=f"{self.number}")
@api.depends('shipment_line.total_colly')
def _compute_total_colly_line(self):