From a26a010324e0cdc743c2b69c9d4100b048df7240 Mon Sep 17 00:00:00 2001 From: Kaushalya Mandaliya Date: Mon, 10 Jun 2019 07:31:06 +0000 Subject: [PATCH] [IMP] sale: prevent email to salesperson when customer opens up a quotation Purpose of this commit, Salesperson does not need email notification as there is not implied action to perform salesperson side. It's just polluting the user's mailbox. What matters is the order confirmation, and they already receive the email. So when a quotation is viewed by the customer, salesperson will no more receive an email that customer has viewed the quotation. task-1950368 closes: #34004 Signed-off-by: Damien Bouvy (dbo) --- addons/sale/controllers/portal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/controllers/portal.py b/addons/sale/controllers/portal.py index 03566515d24..259d218ed13 100644 --- a/addons/sale/controllers/portal.py +++ b/addons/sale/controllers/portal.py @@ -159,7 +159,7 @@ class CustomerPortal(CustomerPortal): if order_sudo and request.session.get('view_quote_%s' % order_sudo.id) != now and request.env.user.share and access_token: request.session['view_quote_%s' % order_sudo.id] = now body = _('Quotation viewed by customer %s') % order_sudo.partner_id.name - _message_post_helper('sale.order', order_sudo.id, body, token=order_sudo.access_token, message_type='notification', subtype="mail.mt_note", partner_ids=order_sudo.user_id.sudo().partner_id.ids) + _message_post_helper('sale.order', order_sudo.id, body, token=order_sudo.access_token, message_type='notification', subtype="mail.mt_note") values = { 'sale_order': order_sudo,