You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

26 lines
1.2 KiB

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- This template replaces the default quantity selector with a text input field
that allows for decimal values. -->
<template id="product_quantity_decimal"
inherit_id="website_sale.product_quantity" name="Select Quantity">
<xpath expr="//input[@name='add_qty']" position="replace">
<input type="text" class="form-control quantity text-center"
data-min="0.1" name="add_qty" t-att-value="add_qty or 1"/>
</xpath>
</template>
<!-- This template replaces the default cart popover button with a button that
displays the total number of items in the cart with one decimal point precision. -->
<template id="cart_popover_decimal" inherit_id="website_sale.cart_popover"
name="Cart Popover">
<xpath expr="//a[hasclass('btn-primary')]" position="replace">
<a role="button" class="btn btn-primary" href="/shop/cart">
View Cart (
<span class="o_wsale_cart_quantity"
t-esc="round(sum(website_sale_order.mapped('website_order_line.product_uom_qty')), 1)"/>
item(s))
</a>
</xpath>
</template>
</odoo>