From 8de3619bc698551e7d23b463d4bcf55f9ad8b62c Mon Sep 17 00:00:00 2001 From: Mqdd Date: Mon, 19 Jan 2026 09:45:14 +0700 Subject: send private message --- indoteknik_custom/models/gudang_service.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/indoteknik_custom/models/gudang_service.py b/indoteknik_custom/models/gudang_service.py index 2a8b589d..5aeabb39 100644 --- a/indoteknik_custom/models/gudang_service.py +++ b/indoteknik_custom/models/gudang_service.py @@ -62,6 +62,11 @@ class GudangService(models.Model): ) % (rec.name, rec.date), 'date_deadline': fields.Date.today(), }) + channel = self.env['mail.channel'].channel_get([self.env.user.partner_id.id, user.partner_id.id]).get('id') + if not channel: + continue + res = self.env['mail.channel'].browse(channel) + res.message_post(body=_('Gudang Service %s masih On Progress sejak %s') % (rec.name, rec.date), message_type='comment', subtype_xmlid='mail.mt_comment') @api.model def cron_notify_onprogress_gudang_service(self): -- cgit v1.2.3