From f3cb0f0114b0e43bb6276e93e3636f0bf55c66b8 Mon Sep 17 00:00:00 2001 From: "Indoteknik ." Date: Sat, 21 Jun 2025 14:20:24 +0700 Subject: (andri) Mark as Completed pada SO akan terekam di chatter --- indoteknik_custom/models/sale_orders_multi_update.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/indoteknik_custom/models/sale_orders_multi_update.py b/indoteknik_custom/models/sale_orders_multi_update.py index 95cfde21..962f60b5 100644 --- a/indoteknik_custom/models/sale_orders_multi_update.py +++ b/indoteknik_custom/models/sale_orders_multi_update.py @@ -11,6 +11,13 @@ class SaleOrdersMultiUpdate(models.TransientModel): sale_ids = self._context['sale_ids'] sales = self.env['sale.order'].browse(sale_ids) sales.action_multi_update_invoice_status() + + for sale in sales: + sale.message_post( + body="Sales Order has been marked as Completed", + message_type="comment" + ) + return { 'type': 'ir.actions.client', 'tag': 'display_notification', -- cgit v1.2.3