[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#121571 X-original-commit: 8e37dcee1f5106e69d5784439e2657acf5706e4e Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit is contained in:
committed by
Victor Feyens
parent
848c285f70
commit
42c404b262
@@ -130,7 +130,7 @@ class CustomerPortal(portal.CustomerPortal):
|
||||
# The "Quotation viewed by customer" log note is an information
|
||||
# dedicated to the salesman and shouldn't be translated in the customer/website lgg
|
||||
context = {'lang': order_sudo.user_id.partner_id.lang or order_sudo.company_id.partner_id.lang}
|
||||
msg = _('Quotation viewed by customer %s', order_sudo.partner_id.name)
|
||||
msg = _('Quotation viewed by customer %s', order_sudo.partner_id.name if request.env.user._is_public() else request.env.user.partner_id.name)
|
||||
del context
|
||||
_message_post_helper(
|
||||
"sale.order",
|
||||
|
||||
Reference in New Issue
Block a user