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

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