Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions website_sale_stock_ux/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<<<<<<< HEAD
||||||| MERGE BASE
=======
##############################################################################
#
# Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar)
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
"name": "Website Sale Stock UX",
"category": "base.module_category_knowledge_management",
"version": "18.0.1.2.0",
"author": "ADHOC SA",
"website": "www.adhoc.com.ar",
"license": "AGPL-3",
"depends": [
"website_sale_stock",
],
"data": [
"views/templates.xml",
"views/snippets.xml",
],
"installable": True,
"auto_install": True,
"application": False,
}

>>>>>>> FORWARD PORTED
23 changes: 23 additions & 0 deletions website_sale_stock_ux/views/templates.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<<<<<<< HEAD
||||||| MERGE BASE
=======
<?xml version='1.0' encoding='utf-8'?>
<odoo>
<template id="out_of_stock_ribbon" inherit_id="website_sale.products_item" active="False">
<xpath expr="//t[@t-set='bg_class']" position="after">
<span t-if="len(product.product_variant_ids) == 1 and product._is_sold_out() and not product.allow_out_of_stock_order" class="o_ribbon o_not_editable o_dirty o_tag_left out_of_stock_ribbon" style="color: var(--o-color-4); background-color:rgb(255, 0, 0)">Out of stock</span>
</xpath>
<xpath expr="//form[hasclass('oe_product_cart')]" position="attributes">
<attribute name="t-attf-class">oe_product_cart h-100 d-flex #{'out_of_stock_img_blur' if (len(product.product_variant_ids) == 1 and product._is_sold_out() and not product.allow_out_of_stock_order) else ''} </attribute>
</xpath>
</template>
<template id="merchant_catalog_availability" inherit_id="website_sale.product">
<xpath expr="//span[@itemprop='image']" position="after">
<t t-if="product.active">
<link itemprop="availability" t-attf-href="https://schema.org/{{'OutOfStock' if product._is_sold_out() and not product.allow_out_of_stock_order else 'InStock'}}"/>
</t>
</xpath>
</template>
</odoo>

>>>>>>> FORWARD PORTED
Loading