diff options
| -rw-r--r-- | indoteknik_custom/models/gudang_service.py | 5 |
1 files changed, 5 insertions, 0 deletions
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 <b>%s</b> masih <b>On Progress</b> sejak %s') % (rec.name, rec.date), message_type='comment', subtype_xmlid='mail.mt_comment') @api.model def cron_notify_onprogress_gudang_service(self): |
