summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/stock_picking.py
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2025-05-23 09:23:09 +0700
committerit-fixcomart <it@fixcomart.co.id>2025-05-23 09:23:09 +0700
commit43313db30da73b87843425c01c723f66ee982886 (patch)
tree1f6dc6e9518c27ac3a867c42f25f56eed6f8cae0 /indoteknik_custom/models/stock_picking.py
parentf6f59e660af6c4229ada54f7313d68867df1ba15 (diff)
parent46e4c80e1b530274c01cca5603f3e1be873820f6 (diff)
Merge branch 'odoo-backup' of https://bitbucket.org/altafixco/indoteknik-addons into odoo-backup
# Conflicts: # indoteknik_custom/models/sale_order.py
Diffstat (limited to 'indoteknik_custom/models/stock_picking.py')
-rw-r--r--indoteknik_custom/models/stock_picking.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py
index 0071bb1a..504338b0 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,6 +584,7 @@ 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.")
@@ -1012,15 +1013,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: