From 14f07cb96fb06ef295c3476f96b73b2e5ff37a72 Mon Sep 17 00:00:00 2001
From: Mansi Gandhi <mag@odoo.com>
Date: Tue, 28 Jun 2016 10:38:40 +0530
Subject: [PATCH] [IMP] website_quote: Notification 'viewed by customer' should
 be received by the responsible only

Currently some customers receive the automatic notification 'Quotation
viewed by customer'. This should not be the case as this notifciation
is purely internal and should only be sent to the quote responsible.

Notification is now a note with the responsible being directly in the
recipients.
---
 addons/website_quote/controllers/main.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/addons/website_quote/controllers/main.py b/addons/website_quote/controllers/main.py
index 92479b90ca24..f1f2d7da6573 100644
--- a/addons/website_quote/controllers/main.py
+++ b/addons/website_quote/controllers/main.py
@@ -23,7 +23,7 @@ class sale_quote(http.Controller):
             if Order and request.session.get('view_quote') != now:
                 request.session['view_quote'] = now
                 body = _('Quotation viewed by customer')
-                _message_post_helper(res_model='sale.order', res_id=Order.id, message=body, token=token, token_field="access_token", message_type='notification')
+                _message_post_helper(res_model='sale.order', res_id=Order.id, message=body, token=token, token_field="access_token", message_type='notification', subtype="mail.mt_note", partner_ids=Order.user_id.partner_id.ids)
         else:
             Order = request.env['sale.order'].search([('id', '=', order_id)])
 
-- 
GitLab