diff --git a/controllers/website_sale.py b/controllers/website_sale.py index 109f04a8a94d2d24c22659bec0624d4434a7df8d..becb8ae8534592693a4d8de7a95f50e0fe9274ab 100644 --- a/controllers/website_sale.py +++ b/controllers/website_sale.py @@ -70,7 +70,10 @@ class CustomWebsiteSale(WebsiteSale): dues = 1 line.name = line.product_id.name - line.original_price = line.price_unit + if line.original_price == 0: + line.original_price = line.price_unit + else: + line.price_unit = line.original_price if dues > 1: line.first_due = True line.is_due = True diff --git a/views/payment_page.xml b/views/payment_page.xml index 00698869f1153456aeb8ef38910c5ae2be2a67e5..28db68efd1ea085ec5743e1d1c954eaffc02e1f8 100644 --- a/views/payment_page.xml +++ b/views/payment_page.xml @@ -8,13 +8,18 @@ <attribute name="t-attf-class">#{'d-none' if line.is_due and not line.first_due else ''}</attribute> </xpath> <xpath expr="//table[@id='cart_products']/tbody/tr" position="inside"> - <td class="td-product_dues"> + <td class="td-product_dues" style="text-align: center;"> <t t-if="line.product_id.has_bodega_category"> <span class="product-dues-display" t-att-data-line-id="line.id"/> </t> </td> </xpath> - + <xpath expr="//table[@id='cart_products']/tbody/tr/td[contains(@class, 'td-qty')]" position="attributes"> + <attribute name="style">text-align: center;</attribute> + </xpath> + <xpath expr="//table[@id='cart_products']/tbody/tr/td[contains(@class, 'td-qty')]/div" position="replace"> + <span t-esc="round(line.product_uom_qty)"/> + </xpath> <xpath expr="//table[@id='cart_products']" position="inside"> <script type="text/javascript"> @@ -67,9 +72,6 @@ }); } } - - }); - document.addEventListener('DOMContentLoaded', function() { var productDuesDisplayElements = document.querySelectorAll('.product-dues-display'); var selected_dues = {};