summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/stock_picking.py
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-05-26 09:33:56 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-05-26 09:33:56 +0700
commitce4c8c6b5e8b61877a66b483f46c1c808f10a8b1 (patch)
tree1672520b36bb0f11d37a7876ed991e59a33d45fe /indoteknik_custom/models/stock_picking.py
parent8fefc2e71c5e8a9f040f2fe6c9310b20cd88db3f (diff)
parent64c86581b469e962789ea6a7ea45c17ed020fe9a (diff)
Merge branch 'odoo-backup' of bitbucket.org:altafixco/indoteknik-addons into odoo-backup
# Conflicts: # indoteknik_custom/models/sale_order_line.py
Diffstat (limited to 'indoteknik_custom/models/stock_picking.py')
-rw-r--r--indoteknik_custom/models/stock_picking.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py
index 3135f41c..0fcb7ca1 100644
--- a/indoteknik_custom/models/stock_picking.py
+++ b/indoteknik_custom/models/stock_picking.py
@@ -288,7 +288,7 @@ class StockPicking(models.Model):
self.ensure_one()
if not self.name or not self.origin:
return False
- return f"{self.name}, {self.origin}"
+ return f"{self.name} {self.origin}"
def _download_pod_photo(self, url):
"""Mengunduh foto POD dari URL"""
@@ -584,7 +584,6 @@ class StockPicking(models.Model):
self.lalamove_phone = phone
self.lalamove_status = pod.get("status")
self.lalamove_delivered_at = delivered_at_dt
- self.driver_arrival_date = delivered_at_dt
return data
raise UserError("No delivered data found in Lalamove response.")
@@ -1013,15 +1012,15 @@ class StockPicking(models.Model):
self.sale_id.date_doc_kirim = self.date_doc_kirim
def action_assign(self):
- if self.sale_id.hold_outgoing and self.location_id.id == 57 and self.location_dest_id.id == 60:
- print(1)
- else:
- res = super(StockPicking, self).action_assign()
+ res = super(StockPicking, self).action_assign()
+ for move in self:
+ # if not move.sale_id.hold_outgoing and move.location_id.id != 57 and move.location_dest_id.id != 60:
+ # TODO cant skip hold outgoing cause of not singleton method
current_time = datetime.datetime.utcnow()
- self.real_shipping_id = self.sale_id.real_shipping_id
- self.date_availability = current_time
+ move.real_shipping_id = move.sale_id.real_shipping_id
+ move.date_availability = current_time
# self.check_state_reserve()
- return res
+ return res
def ask_approval(self):
if self.env.user.is_accounting: