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.
116 lines
7.4 KiB
116 lines
7.4 KiB
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<odoo>
|
|
<!-- Template for Cart Lines-->
|
|
<template id="coffee_cart_lines" inherit_id="website_sale.cart_lines"
|
|
name="Coffee Cart Lines">
|
|
<xpath expr="//div[@id='cart_products']" position="replace">
|
|
<div class="table-responsive">
|
|
<table t-if="website_sale_order and website_sale_order.website_order_line"
|
|
class="mb16 table-striped table-sm js_cart_lines"
|
|
id="cart_products">
|
|
<t t-set="show_qty"
|
|
t-value="is_view_active('website_sale.product_quantity')"/>
|
|
<thead>
|
|
<tr>
|
|
<th class="td-img">Product</th>
|
|
<th/>
|
|
<th class="text-center td-qty">
|
|
<t t-if="show_qty">
|
|
Quantity
|
|
</t>
|
|
</th>
|
|
<th class="text-center td-price">Total</th>
|
|
<th class="text-center td-action"/>
|
|
</tr>
|
|
<tr class="height_30"/>
|
|
</thead>
|
|
<tbody>
|
|
<t t-foreach="website_sale_order.website_order_line"
|
|
t-as="line">
|
|
<tr t-att-class="'optional_product info' if line.linked_line_id else None"
|
|
class="cstm_tbl">
|
|
<td t-if="not line.product_id" colspan="2"
|
|
class='td-img cstm_tbl'/>
|
|
<t t-else="">
|
|
<td align="center"
|
|
class='td-img cstm_tbl image_td'>
|
|
<span t-if="line._is_not_sellable_line() and line.product_id.image_128">
|
|
<img t-att-src="image_data_uri(line.product_id.image_128)"
|
|
class="sample"
|
|
t-att-alt="line.name_short"/>
|
|
</span>
|
|
<span t-else=""
|
|
t-field="line.product_id.image_128"
|
|
t-options="{'widget': 'image', 'qweb_img_responsive': False, 'class': 'sample'}"/>
|
|
</td>
|
|
<td class='td-product_name cstm_tbl'>
|
|
<div>
|
|
<t t-call="website_sale.cart_line_product_link">
|
|
<p class="item-name">
|
|
<strong t-field="line.name_short"/>
|
|
</p>
|
|
</t>
|
|
</div>
|
|
<p class="item-about">
|
|
<t t-esc="line.product_id.categ_id.name"/>
|
|
</p>
|
|
</td>
|
|
</t>
|
|
<td class="text-center td-qty cstm_tbl">
|
|
<div class="css_quantity input-group mx-auto justify-content-center"
|
|
name="website_sale_cart_line_quantity">
|
|
<t t-if="not line._is_not_sellable_line()">
|
|
<t t-if="show_qty">
|
|
<div class="counter">
|
|
<div class="box-container">
|
|
<a t-attf-href="#"
|
|
class="btn btn-link js_add_cart_json d-none d-md-inline-block border_link"
|
|
aria-label="Remove one"
|
|
title="Remove one">
|
|
<i class="fa fa-minus"/>
|
|
</a>
|
|
<input type="text"
|
|
class="js_quantity form-control quantity"
|
|
t-att-data-line-id="line.id"
|
|
t-att-data-product-id="line.product_id.id"
|
|
t-att-value="int(line.product_uom_qty) == line.product_uom_qty and int(line.product_uom_qty) or line.product_uom_qty"/>
|
|
<a t-attf-href="#"
|
|
class="btn btn-link float_left js_add_cart_json d-none d-md-inline-block border_link"
|
|
aria-label="Add one"
|
|
title="Add one">
|
|
<i class="fa fa-plus"/>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
<t t-else="">
|
|
<input type="hidden"
|
|
class="js_quantity form-control quantity"
|
|
t-att-data-line-id="line.id"
|
|
t-att-data-product-id="line.product_id.id"
|
|
t-att-value="int(line.product_uom_qty) == line.product_uom_qty and int(line.product_uom_qty) or line.product_uom_qty"/>
|
|
</t>
|
|
</t>
|
|
<t t-else="">
|
|
<span class="text-muted w-100"
|
|
t-esc="int(line.product_uom_qty)"/>
|
|
<input type="hidden"
|
|
class="js_quantity form-control quantity"
|
|
t-att-data-line-id="line.id"
|
|
t-att-data-product-id="line.product_id.id"
|
|
t-att-value="line.product_uom_qty"/>
|
|
</t>
|
|
</div>
|
|
</td>
|
|
<td class="cstm_tbl" align="center">
|
|
<t t-esc="website_sale_order.currency_id.symbol"/>
|
|
<t t-esc="line.price_subtotal"/>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
</odoo>
|
|
|