From 46e4c80e1b530274c01cca5603f3e1be873820f6 Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Fri, 23 May 2025 09:21:45 +0700 Subject: bf cant create invoice cause of custom method action assign wrong implement --- indoteknik_custom/models/stock_picking.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indoteknik_custom/models/stock_picking.py') diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index 3135f41c..504338b0 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -1013,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: -- cgit v1.2.3 From 4fc520a9b0d1e2e809033b35562fd80fffad472d Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Fri, 23 May 2025 09:37:45 +0700 Subject: Revert "bf cant create invoice cause of custom method action assign wrong implement" This reverts commit 46e4c80e1b530274c01cca5603f3e1be873820f6. --- indoteknik_custom/models/stock_picking.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indoteknik_custom/models/stock_picking.py') diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index 504338b0..3135f41c 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -1013,15 +1013,15 @@ class StockPicking(models.Model): self.sale_id.date_doc_kirim = self.date_doc_kirim def action_assign(self): - 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 + 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() current_time = datetime.datetime.utcnow() - move.real_shipping_id = move.sale_id.real_shipping_id - move.date_availability = current_time + self.real_shipping_id = self.sale_id.real_shipping_id + self.date_availability = current_time # self.check_state_reserve() - return res + return res def ask_approval(self): if self.env.user.is_accounting: -- cgit v1.2.3 From dbf09bbf792809e84d2d0330a992e42b3a5c6994 Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Fri, 23 May 2025 09:38:02 +0700 Subject: Revert "Merge branch 'odoo-backup' of https://bitbucket.org/altafixco/indoteknik-addons into odoo-backup" This reverts commit 43313db30da73b87843425c01c723f66ee982886, reversing changes made to f6f59e660af6c4229ada54f7313d68867df1ba15. --- indoteknik_custom/models/stock_picking.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indoteknik_custom/models/stock_picking.py') diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index 3135f41c..0071bb1a 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.") -- cgit v1.2.3 From d27999cacee59a115ae3c6c46542c2e20cfe176b Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Fri, 23 May 2025 09:42:03 +0700 Subject: bf cant create invoice dp cause of custom method action assign stock picking --- indoteknik_custom/models/stock_picking.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indoteknik_custom/models/stock_picking.py') diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index 0071bb1a..0fcb7ca1 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -1012,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: -- cgit v1.2.3