product_print_category_supermarket add price per kg or L.

This commit is contained in:
Luis 2025-01-02 17:21:44 +01:00
parent 7bc0f90a65
commit d1be5f8f09
2 changed files with 65 additions and 4 deletions

View file

@ -53,22 +53,42 @@
.product_member_price {
font-size: 1.1em;
position: absolute;
width: 58%;
width: 50%;
text-align: right;
margin-top: 2.2cm;
margin-left: 2.8cm;
margin-left: 3cm;
padding-right: 0.2cm;
background-color: green;
color: white;
}
.product_price_per_uom_member {
font-size: 0.7em;
position: absolute;
width: 50%;
text-align: left;
margin-top: 2.4cm;
margin-left: 0.8cm;
padding-right: 0.2cm;
}
.product_public_price {
font-size: 1em;
position: absolute;
width: 58%;
width: 50%;
margin-top: 2.9cm;
margin-left: 2.8cm;
margin-left: 3cm;
text-align: right;
padding-right: 0.2cm;
}
.product_price_per_uom_public {
font-size: 0.6em;
position: absolute;
width: 50%;
margin-top: 3cm;
margin-left: 0.8cm;
text-align: left;
padding-right: 0.2cm;
}

View file

@ -33,6 +33,26 @@
t-options='{"widget": "float", "precision": 2}'
/> €</strong>
</div>
<div class="product_price_per_uom_member floating_box">
<t t-if="product.volume">
<t
t-set="price_uom"
t-value="round(members_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(members_price / (product.net_weight), 2)"
/>
<span
t-out="price_uom"
t-options='{"widget": "float", "precision": 2}' /> €/Kg.
</t>
</div>
<div class="product_public_price" >
<t
t-set="public_price"
@ -44,6 +64,27 @@
/>
</strong>
</div>
<!-- Price per Kg or L -->
<div class="product_price_per_uom_public floating_box">
<t t-if="product.volume">
<t
t-set="price_uom"
t-value="round(public_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(public_price / (product.net_weight), 2)"
/>
<span
t-out="price_uom"
t-options='{"widget": "float", "precision": 2}' /> €/Kg.
</t>
</div>
</div>
</t>
</t>