LaOsaCoop/laosa16#12 product_print_category_supermarket: uom price from volume or net_weight
This commit is contained in:
parent
bf582e5081
commit
4600c0d840
1 changed files with 19 additions and 8 deletions
|
|
@ -18,17 +18,28 @@
|
|||
t-options='{"widget": "float", "precision": 2}'
|
||||
/> €</strong>
|
||||
</div>
|
||||
<t t-if="product.packaging_ids and product.packaging_ids[0].qty">
|
||||
<t t-if="product.volume or product.net_weight">
|
||||
<div
|
||||
style="vertical-align: bottom; position: absolute; bottom: 3mm; left: 3mm;
|
||||
font-size: 0.8em; text-align: left;">
|
||||
<t t-set="unit_price"
|
||||
t-value="round(product.list_price / product.packaging_ids[0].qty, 1)" />
|
||||
<strong>
|
||||
<t t-out="unit_price" t-options='{"widget": "float", "precision": 2}' /> €
|
||||
</strong>
|
||||
<strong>/</strong>
|
||||
<strong t-field="product.packaging_ids[0].name" />
|
||||
<t t-if="product.volume">
|
||||
<t
|
||||
t-set="price_uom"
|
||||
t-value="round(product.list_price / (product.volume), 2)"
|
||||
/>
|
||||
<span
|
||||
t-out="price_uom"
|
||||
t-options='{"widget": "float", "precision": 2}' /> €/L.
|
||||
</t>
|
||||
<t t-if="product.net_weight">
|
||||
<t
|
||||
t-set="price_uom"
|
||||
t-value="round(product.list_price / (product.net_weight), 2)"
|
||||
/>
|
||||
<span
|
||||
t-out="price_uom"
|
||||
t-options='{"widget": "float", "precision": 2}' /> €/Kg.
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
<div
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue