summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorLucas Perais (lpe) <lpe@odoo.com>2018-07-25 16:06:13 +0200
committerLucas Perais (lpe) <lpe@odoo.com>2018-07-26 14:20:15 +0200
commit2e5dc495bbdf975fc30763afd5893514108b3bdc (patch)
treeb161e0aa3e1c8aa2e57790e1777ffa67dd58e0b5 /addons
parent1353abecbe397727c95a8487e3f697b266f7b0f8 (diff)
[FIX] sale: portal SO view no image if public
Access a SO with the access token, without being logged Before this commit, the images of the so lines were the no image placeholder This was because the route of the image was so.line/product_image Since the token applies on SO, and not on its lines, nothing simple would work After this commit, we hide the image if the user is the public one OPW 1868916 closes #25973
Diffstat (limited to 'addons')
-rw-r--r--addons/sale/views/sale_portal_templates.xml3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/sale/views/sale_portal_templates.xml b/addons/sale/views/sale_portal_templates.xml
index 3c518b9a755..70c6b60a3be 100644
--- a/addons/sale/views/sale_portal_templates.xml
+++ b/addons/sale/views/sale_portal_templates.xml
@@ -237,12 +237,13 @@
</div>
<t t-foreach="order.order_line" t-as="ol">
<div class="row orders_vertical_align">
- <div class="visible-lg col-lg-1 text-center">
+ <div t-if="not request.env.user._is_public()" class="visible-lg col-lg-1 text-center">
<span t-field="ol.product_image" t-options="{'widget': 'image', 'class': 'img-rounded', 'style':'width: 48px;height:48px'}" />
</div>
<div id='product_name' class="col-lg-4 col-sm-6 col-xs-3">
<span t-esc="ol.product_id.name"/>
</div>
+ <div t-if="request.env.user._is_public()" class="visible-lg col-lg-1 text-center" /> <!-- Just for alignment -->
<div class="col-xs-3 text-right">
<span t-field="ol.price_unit" t-options='{"widget": "monetary", "display_currency": order.pricelist_id.currency_id}'/>
</div>