[FIX] product: use correct price field

Commit fa034b2a64 removed lst_price on
product.template That means we need to check if product is a variant or
not to choose the suitable price field.

closes odoo/odoo#76503

X-original-commit: c50e7b106b08577228a410e1e34403bd8a6eb80d
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
This commit is contained in:
William Henrotin
2021-09-15 07:48:12 +00:00
parent eb4d8e452c
commit 07ee514897
@@ -21,7 +21,12 @@
<div class="o_label_extra_data">
<t t-out="extra_html"/>
</div>
<strong class="o_label_price" t-field="product.lst_price" t-options="{'widget': 'monetary', 'label_price': True}"/>
<t t-if="product.is_product_variant">
<strong class="o_label_price" t-field="product.lst_price" t-options="{'widget': 'monetary', 'label_price': True}"/>
</t>
<t t-else="">
<strong class="o_label_price" t-field="product.list_price" t-options="{'widget': 'monetary', 'label_price': True}"/>
</t>
</div>
<div class="o_label_clear"></div>
</div>
@@ -38,7 +43,12 @@
<strong t-field="product.display_name"/>
</div>
<div class="text-right" style="padding-top:0;padding-bottom:0">
<strong class="o_label_price_medium" t-field="product.lst_price" t-options="{'widget': 'monetary', 'label_price': True}"/>
<t t-if="product.is_product_variant">
<strong class="o_label_price_medium" t-field="product.lst_price" t-options="{'widget': 'monetary', 'label_price': True}"/>
</t>
<t t-else="">
<strong class="o_label_price_medium" t-field="product.list_price" t-options="{'widget': 'monetary', 'label_price': True}"/>
</t>
</div>
<div class= "text-center o_label_small_barcode">
<span class="text-nowrap" t-field="product.default_code"/>
@@ -64,7 +74,12 @@
<span class="text-nowrap" t-field="product.default_code"/>
</div>
<div class="o_label_price_medium text-right">
<strong t-field="product.lst_price" t-options="{'widget': 'monetary', 'label_price': True}"/>
<t t-if="product.is_product_variant">
<strong t-field="product.lst_price" t-options="{'widget': 'monetary', 'label_price': True}"/>
</t>
<t t-else="">
<strong t-field="product.list_price" t-options="{'widget': 'monetary', 'label_price': True}"/>
</t>
</div>
</t>
<t t-else="">
@@ -98,7 +113,12 @@
<small class="text-nowrap" t-field="product.default_code"/>
</div>
<div class="text-right" style="padding: 0 4px;">
<strong class="o_label_price_small" t-field="product.lst_price" t-options="{'widget': 'monetary', 'label_price': True}"/>
<t t-if="product.is_product_variant">
<strong class="o_label_price_small" t-field="product.lst_price" t-options="{'widget': 'monetary', 'label_price': True}"/>
</t>
<t t-else="">
<strong class="o_label_price_small" t-field="product.list_price" t-options="{'widget': 'monetary', 'label_price': True}"/>
</t>
<div class="o_label_extra_data">
<t t-out="extra_html"/>
</div>