diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2025-06-02 09:23:07 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2025-06-02 09:23:07 +0700 |
| commit | 2bc522f12795bbd649d28fbc6f127df2ebac34ee (patch) | |
| tree | 0dfebb75f458c738f63593313b0e19e917e85860 /indoteknik_custom/models/shipment_group.py | |
| parent | 1a0b0cb4a740d831f69ea29943cfa0aed8e31fac (diff) | |
| parent | 484b0e613d0d021faa11c619087baf36e4eacd09 (diff) | |
<hafid> fix email to Putra & Darren in pengajuan Tempo
Diffstat (limited to 'indoteknik_custom/models/shipment_group.py')
| -rw-r--r-- | indoteknik_custom/models/shipment_group.py | 12 |
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): |
