Browse Source

[IMP+FIX] do not overwrite OrderLine qweb template. Add a t-jquery operation

pull/501/head
Sylvain LE GAL 4 years ago
parent
commit
8d4d7d56f4
  1. 0
      pos_tare/demo/uom_uom.xml
  2. 47
      pos_tare/static/src/xml/pos_tare.xml

0
pos_tare/demo/pos_tare_demo.xml → pos_tare/demo/uom_uom.xml

47
pos_tare/static/src/xml/pos_tare.xml

@ -18,43 +18,16 @@
</t>
</t>
</t>
<t t-name="Orderline">
<li t-attf-class="orderline #{ line.selected ? 'selected' : '' }">
<span class="product-name">
<t t-esc="line.get_product().display_name"/>
</span>
<span class="price">
<t t-esc="widget.format_currency(line.get_display_price())"/>
</span>
<ul class="info-list">
<t t-if="line.get_quantity_str() !== '1' || line.selected ">
<li class="info">
<em>
<t t-esc="line.get_quantity_str()" />
</em>
<t t-esc="line.get_unit().name" />
at
<t t-esc="widget.format_currency(line.get_unit_display_price(),'Product Price')" />
/
<t t-esc="line.get_unit().name" />
</li>
</t>
<t t-if="line.get_discount_str() !== '0'">
<li class="info">
With a
<em>
<t t-esc="line.get_discount_str()" />%
</em>
discount
</li>
</t>
<t t-if="line.get_tare_str() !== '0'">
<li class="info">
tare = <t t-esc="line.get_tare_str_with_unit()" />
</li>
</t>
</ul>
</li>
<t t-extend="Orderline">
<t t-jquery=".info-list:last-child" t-operation="append">
<t t-if="line.get_tare_str() !== '0'">
<li class="info">
<i class="fa fa-beer"/>
Tare : <t t-esc="line.get_tare_str_with_unit()" />
</li>
</t>
</t>
</t>
</templates>
Loading…
Cancel
Save