You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

27 lines
1.3 KiB

<?xml version="1.0" encoding="UTF-8"?>
<!--Copyright 2014-2015 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
Copyright 2018 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). -->
<templates id="template" xml:space="preserve">
<t t-extend="Product">
<t t-jquery=".product-img" t-operation="append">
<t t-if="product.type == 'product'">
<span t-attf-class="qty-tag #{product.qty_available lte 0 ? 'not-available':''}">
<t t-esc="product.qty_available"/>
</span>
</t>
</t>
</t>
<t t-extend="Orderline">
<t t-jquery=".info-list>t:first-child">
this.attr('t-if', "line.get_quantity_str() !== '1' || line.selected || line.get_product().qty_available lt line.quantity ");
</t>
<t t-jquery="t[t-esc='line.get_quantity_str()']" t-operation="after">
<t t-if="line.get_product().type == 'product'">
<t t-set='qty_available' t-value='line.get_product().qty_available'/>
(of <span t-attf-class="qty-info #{qty_available lt line.quantity ? 'not-available':''}"><t t-esc="qty_available"/></span>)
</t>
</t>
</t>
</templates>