summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/sale_order.py
diff options
context:
space:
mode:
authorMiqdad <ahmadmiqdad27@gmail.com>2025-07-14 10:49:57 +0700
committerMiqdad <ahmadmiqdad27@gmail.com>2025-07-14 10:49:57 +0700
commitfc0fb7fba28ad5eaf3ec1e868b54567d6f127c65 (patch)
treeb4052552d3a289ae526bd81ae00d6d4e450b1d2c /indoteknik_custom/models/sale_order.py
parent5af60fda5cd584011e3f29b57ef018d7d66aee21 (diff)
parent2af07f60a639089efc553966799b3dc225a397a2 (diff)
<miqdad> merge
Diffstat (limited to 'indoteknik_custom/models/sale_order.py')
-rwxr-xr-xindoteknik_custom/models/sale_order.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index 591951ca..e197a6af 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -3048,6 +3048,10 @@ class SaleOrder(models.Model):
if picking.state == 'assigned':
picking.carrier_id = vals['carrier_id']
+ for picking in order.picking_ids:
+ if picking.state not in ['done', 'cancel', 'assigned']:
+ picking.write({'carrier_id': vals['carrier_id']})
+
try:
helper_ids = self._get_helper_ids()
if str(self.env.user.id) in helper_ids: