[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.
This commit is contained in:
Mansi Gandhi
2016-09-02 11:45:23 +02:00
committed by Thibault Delavallée
parent cdaee93f7f
commit 14f07cb96f
+1 -1
View File
@@ -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)])