From 360c47384d876d17725be8ff3ca6b83a9078615b Mon Sep 17 00:00:00 2001 From: "Indoteknik ." Date: Tue, 13 May 2025 10:10:34 +0700 Subject: (andri) revisi current date pada log note purchase pricelist --- indoteknik_custom/models/purchase_order.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index a3e2c388..c5ba5792 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -562,7 +562,9 @@ class PurchaseOrder(models.Model): i = 0 for line in self.order_line: i += 1 - current_time = datetime.utcnow() + + utc_time = fields.Datetime.now() + current_time = utc_time.astimezone(timezone('Asia/Jakarta')).strftime('%Y-%m-%d %H:%M:%S') # print(i, len(self.order_line)) price_unit = line.price_unit @@ -635,7 +637,6 @@ class PurchaseOrder(models.Model): {"".join(changes)}
  • System Update: {current_time}
  • - Updated By: {self.env.user.name} """ purchase_pricelist.message_post(body=message, subtype_id=self.env.ref("mail.mt_note").id) -- cgit v1.2.3