Skip to content

Commit

Permalink
Merge PR #823 into 13.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Aug 3, 2023
2 parents 3ec22ad + 7e1f19a commit bb47323
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions website_sale_stock_available_display/templates/templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,18 @@
t-set="virtual_available"
t-value="line.product_id.with_context(website_sale_stock_available=True).virtual_available"
/>
<!-- We don't want to show negative values -->
<t
t-set="virtual_available"
t-value="virtual_available if virtual_available > 0.0 else 0.0"
/>
<t
t-set="virtual_available_formatted"
t-value="env['ir.qweb.field.float'].value_to_html(virtual_available, {'decimal_precision': 'Product Unit of Measure'})"
/>
<div
t-attf-class="availability_messages text-#{virtual_available &gt; 0.0 and 'success' or 'danger'}"
>
<t
t-set="virtual_available"
t-value="virtual_available if virtual_available > 0.0 else 0.0"
/>
<span><t t-esc="virtual_available_formatted" /> <t
t-esc="line.product_uom.name"
/> in stock</span>
Expand Down

0 comments on commit bb47323

Please sign in to comment.