Skip to content
Snippets Groups Projects
Commit 3489fd16 authored by David Tran's avatar David Tran
Browse files

[FIX] sale: log notes with wrong quotation viewer


The note "Quotation viewed by customer" posted when a public/portal user
access an order came with the order's partner name instead of the actual
user's partner name

This made confused for internal users to see something in internal note
like **Colleen Diaz** with a message **Quotation viewed by customer
Nicole Ford**

This commit makes sure to use the right partner name except the
quotation is viewed anonymously (with access token)

closes odoo/odoo#121490

Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
parent 31046332
No related branches found
No related tags found
No related merge requests found
......@@ -189,7 +189,7 @@ class CustomerPortal(CustomerPortal):
session_obj_date = request.session.get('view_quote_%s' % order_sudo.id)
if session_obj_date != 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)
body = _('Quotation viewed by customer %s', order_sudo.partner_id.name if request.env.user._is_public() else request.env.user.partner_id.name)
_message_post_helper(
"sale.order",
order_sudo.id,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment