[FIX] website_crm_partner_assign: error on opportunity page
Steps to Reproduce =================== 1). Create an opportunity, and give it a new contact 2). Set Joel Willis as the reseller (needs a partner grade for that) 3). Log in as Joel, and try to open this opportunity through the portal -> Access Error 403 Technical ========== We are trying to show the avatar of the partner because a portal user doesn't have access to see the avatar so 403 forbidden errors occur. This problem occurred after this commit: https://github.com/odoo/odoo/commit/df8535fbd40e1e5c09dbe616a3332c76c23525c8 After this commit ================= Now portal user can see the opportunity. Task-3580254 closes odoo/odoo#144113 Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
This commit is contained in:
@@ -666,8 +666,8 @@
|
||||
<strong class="col-12 col-sm-3">Customer</strong>
|
||||
<div class="col">
|
||||
<div class="d-flex justify-content-start align-items-center gap-2 mb-2" t-if="opportunity.partner_name or opportunity.contact_name">
|
||||
<img t-if="opportunity.partner_id.avatar_1024" class="o_avatar o_portal_contact_img rounded"
|
||||
t-att-src="image_data_uri(opportunity.partner_id.avatar_512)"
|
||||
<img t-if="opportunity.partner_id.sudo().avatar_1024" class="o_avatar o_portal_contact_img rounded"
|
||||
t-att-src="image_data_uri(opportunity.partner_id.sudo().avatar_512)"
|
||||
alt="Contact" width="50"/>
|
||||
<div class="d-flex flex-column justify-content-center">
|
||||
<h5 class="mb-0" t-if="opportunity.partner_name" t-out="opportunity.partner_name"/>
|
||||
|
||||
Reference in New Issue
Block a user