From b7b71be97a73f454f2df9fd9a37f5017c82192ae Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Tue, 12 Mar 2024 11:50:21 +0700 Subject: Add email template notification web approve on sale order --- indoteknik_custom/models/sale_order.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indoteknik_custom/models/sale_order.py') diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 0cd7067a..b7578da0 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -651,6 +651,9 @@ class SaleOrder(models.Model): raise UserError('You are not authorized to approve this order. Only %s can approve this order.' % self.partner_id.user_id.name) self.web_approval = 'company' + template = self.env.ref('indoteknik_custom.mail_template_sale_order_web_approve_notification') + template.send_mail(self.id, force_send=True) + return { 'type': 'ir.actions.client', 'tag': 'display_notification', -- cgit v1.2.3