summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/sale_order.py
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-07-14 17:03:30 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-07-14 17:03:30 +0700
commit2eb64e50e1d41af96cf29097a5781d4df08d5f16 (patch)
tree4f7e45008821a62959585533ca20527627fdd8dc /indoteknik_custom/models/sale_order.py
parentee77ca5ec2947ba672c7becee3ecb583f4f25916 (diff)
parent1b70be54f939974c0232abf215f8a432b6c15244 (diff)
Merge branch 'odoo-backup' of bitbucket.org:altafixco/indoteknik-addons into odoo-backup
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: