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.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/indoteknik_custom/models/shipment_group.py b/indoteknik_custom/models/shipment_group.py
index 48a3fa21..87d222a6 100644
--- a/indoteknik_custom/models/shipment_group.py
+++ b/indoteknik_custom/models/shipment_group.py
@@ -17,6 +17,14 @@ class ShipmentGroup(models.Model):
carrier_id = fields.Many2one('delivery.carrier', string='Ekspedisi')
total_colly_line = fields.Float(string='Total Colly', compute='_compute_total_colly_line')
+ 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()
+
@api.depends('shipment_line.total_colly')
def _compute_total_colly_line(self):
for rec in self: