[MOV] website_product_cores: from Hibou Suite Enterprise for 13.0

This commit is contained in:
Jared Kipe
2020-07-03 09:22:17 -07:00
parent 84ad8f9dfd
commit 52e30a6943
3 changed files with 55 additions and 0 deletions

View File

@@ -0,0 +1 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.

View File

@@ -0,0 +1,23 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
{
'name': 'Website Product Cores',
'author': 'Hibou Corp. <hello@hibou.io>',
'version': '13.0.1.0.0',
'license': 'OPL-1',
'category': 'Website',
'description': """
Removes Trash icon from Core Product
""",
'website': 'https://hibou.io/',
'depends': [
'product_cores',
'website_sale',
],
'data': [
'views/templates.xml',
],
'installable': True,
'application': False,
'auto_install': True,
}

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="cart_lines_inherit" inherit_id="website_sale.cart_lines" >
<xpath expr="//td[4]" position="replace">
<td class="text-center td-qty">
<div class="css_quantity input-group mx-auto">
<div t-if="not line.product_id.core_ok" class="input-group-prepend">
<a t-attf-href="#" class="btn btn-link js_add_cart_json d-none d-md-inline-block" aria-label="Remove one" title="Remove one">
<i class="fa fa-minus"></i>
</a>
</div>
<input readonly="readonly" 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" />
<div t-if="not line.product_id.core_ok" class="input-group-append">
<a t-attf-href="#" class="btn btn-link float_left js_add_cart_json d-none d-md-inline-block" aria-label="Add one" title="Add one">
<i class="fa fa-plus"></i>
</a>
</div>
</div>
</td>
</xpath>
<xpath expr="//td[6]" position="replace">
<td class="td-action">
<div t-if="not line.product_id.core_ok">
<a href='#' aria-label="Remove from cart" title="Remove from cart" class='js_delete_product no-decoration'> <small><i class='fa fa-trash-o'></i></small></a>
</div>
</td>
</xpath>
</template>
</odoo>