summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/sale_order.py
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-11-14 16:08:42 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-11-14 16:08:42 +0700
commit7b60204cb96af3d180fa21570c7540722184ab4e (patch)
tree407017a4addad6a544ee05ef1e7b941c6745fe8a /indoteknik_custom/models/sale_order.py
parent95810d47b28ec503aee6753ffa4ac3d0ca9877e8 (diff)
fix bug wati
Diffstat (limited to 'indoteknik_custom/models/sale_order.py')
-rwxr-xr-xindoteknik_custom/models/sale_order.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index e90ca995..80e111a8 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -973,8 +973,8 @@ class SaleOrder(models.Model):
note.append(line.name)
if order.picking_ids:
- # Sort picking_ids by date and get the most recent one
- latest_picking = order.picking_ids.sorted(key=lambda p: p.scheduled_date, reverse=True)[0]
+ # Sort picking_ids by creation date to get the most recent one
+ latest_picking = order.picking_ids.sorted(key=lambda p: p.create_date, reverse=True)[0]
latest_picking.notee = '\n'.join(note)
return res