[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
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user