[FIX] 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.

Conflicts:
	addons/website_quote/controllers/main.py

Backport of 14f07cb96f
opw-687957
This commit is contained in:
Mansi Gandhi
2016-09-15 13:40:33 +02:00
committed by Nicolas Martinelli
parent ce3341a906
commit 5a104fcb1a
+1 -1
View File
@@ -30,7 +30,7 @@ class sale_quote(http.Controller):
if request.session.get('view_quote',False)!=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)
days = 0
if order.validity_date:
days = (datetime.datetime.strptime(order.validity_date, '%Y-%m-%d') - datetime.datetime.now()).days + 1