diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/website_sale_stock_product_configurator | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/website_sale_stock_product_configurator')
3 files changed, 32 insertions, 0 deletions
diff --git a/addons/website_sale_stock_product_configurator/__init__.py b/addons/website_sale_stock_product_configurator/__init__.py new file mode 100644 index 00000000..67dee8c6 --- /dev/null +++ b/addons/website_sale_stock_product_configurator/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. diff --git a/addons/website_sale_stock_product_configurator/__manifest__.py b/addons/website_sale_stock_product_configurator/__manifest__.py new file mode 100644 index 00000000..b7c4c43b --- /dev/null +++ b/addons/website_sale_stock_product_configurator/__manifest__.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +{ + 'name': "Website Sale Stock Product Configurator", + 'summary': """ + Bridge module for website_sale_stock / sale_product_configurator""", + 'description': """ + Bridge module to make the website e-commerce stock management compatible with the product configurator + """, + 'category': 'Hidden', + 'version': '1.0', + 'depends': ['website_sale_stock', 'sale_product_configurator'], + 'auto_install': True, + 'data': [ + 'views/product_configurator_templates.xml', + ], + 'license': 'LGPL-3', +} diff --git a/addons/website_sale_stock_product_configurator/views/product_configurator_templates.xml b/addons/website_sale_stock_product_configurator/views/product_configurator_templates.xml new file mode 100644 index 00000000..63ceacfd --- /dev/null +++ b/addons/website_sale_stock_product_configurator/views/product_configurator_templates.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <template id="website_sale_stock_modal" inherit_id="sale_product_configurator.configure_optional_products" name="Stocks Modal"> + <xpath expr="//input[@type='text'][hasclass('quantity')]" position="attributes"> + <attribute name='t-att-data-max'>max(product.sudo().virtual_available - product.cart_qty, 1) if handle_stock and product.type == "product" and product.inventory_availability in ["always", "threshold"] else None</attribute> + </xpath> + <xpath expr="//div[hasclass('css_quantity')]" position="after"> + <t t-if="handle_stock"> + <div class='availability_messages'/> + </t> + </xpath> + </template> +</odoo>
\ No newline at end of file |
