diff --git a/pos_restrict_product_stock/README.rst b/pos_restrict_product_stock/README.rst new file mode 100644 index 000000000..fc04afcbb --- /dev/null +++ b/pos_restrict_product_stock/README.rst @@ -0,0 +1,50 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Display Stock in POS | Restrict Out-of-Stock Products in POS +============================================================= +This module enables you to limit the ordering of out-of-stock products in POS as well as display the available quantity for each product (on-hand quantity and virtual quantity) + +Configuration +============= +No additional configuration required + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Affero General Public License v3.0 (AGPL v3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +Developer: V15 Gayathri V + V16 Raneesha M K, + +Contact : odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if +your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/pos_restrict_product_stock/__init__.py b/pos_restrict_product_stock/__init__.py new file mode 100644 index 000000000..9c8be744a --- /dev/null +++ b/pos_restrict_product_stock/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Gayathri V(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import models diff --git a/pos_restrict_product_stock/__manifest__.py b/pos_restrict_product_stock/__manifest__.py new file mode 100644 index 000000000..e0ddbf41f --- /dev/null +++ b/pos_restrict_product_stock/__manifest__.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Gayathri v (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +{ + 'name': 'Display Stock in POS | Restrict Out-of-Stock Products in POS', + 'version': '15.0.1.0.0', + 'category': 'Point of Sale', + 'summary': "Enhance your Point of Sale experience by preventing the " + "ordering of out-of-stock products during your session", + 'description': "This module enables you to limit the ordering of " + "out-of-stock products in POS as well as display the " + "available quantity for each product (on-hand quantity " + "and virtual quantity).", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['point_of_sale'], + 'data': [ + 'views/pos_config_views.xml' + ], + 'assets': { + 'point_of_sale.assets': [ + '/pos_restrict_product_stock/static/src/css/display_stock.css', + '/pos_restrict_product_stock/static/src/js/RestrictStockPopup.js', + '/pos_restrict_product_stock/static/src/js/ProductScreen.js', + ], + 'web.assets_qweb': [ + '/pos_restrict_product_stock/static/src/xml/ProductItem.xml', + '/pos_restrict_product_stock/static/src/xml/RestrictStockPopup.xml', + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/pos_restrict_product_stock/doc/RELEASE_NOTES.md b/pos_restrict_product_stock/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..b2a1bd841 --- /dev/null +++ b/pos_restrict_product_stock/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 06.12.2023 +#### Version 15.0.1.0.0 +#### ADD +- Initial Commit for Display Stock in POS | Restrict Out-of-Stock Products in POS diff --git a/pos_restrict_product_stock/models/__init__.py b/pos_restrict_product_stock/models/__init__.py new file mode 100644 index 000000000..290d1ec05 --- /dev/null +++ b/pos_restrict_product_stock/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Gayathri v (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import pos_config diff --git a/pos_restrict_product_stock/models/pos_config.py b/pos_restrict_product_stock/models/pos_config.py new file mode 100644 index 000000000..5aba2db65 --- /dev/null +++ b/pos_restrict_product_stock/models/pos_config.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Gayathri V(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import fields, models + + +class PosConfig(models.Model): + """Inherited pos configuration setting for adding some + fields for restricting out-of stock""" + _inherit = 'pos.config' + + is_display_stock = fields.Boolean(string="Display Stock in POS", + help="Enable if you want to show " + "quantity of products") + is_restrict_product = fields.Boolean( + string="Restrict Product Out-of Stock in POS", + help="Enable if you want restrict of stock product from pos") + stock_type = fields.Selection([('qty_on_hand', 'Qty on Hand'), + ('virtual_qty', 'Virtual Qty'), + ('both', 'Both')], required=True, + default='qty_on_hand', string="Stock Type", + help="In which quantity type you" + " have to restrict and display") diff --git a/pos_restrict_product_stock/models/pos_session.py b/pos_restrict_product_stock/models/pos_session.py new file mode 100644 index 000000000..c87445d95 --- /dev/null +++ b/pos_restrict_product_stock/models/pos_session.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Gayathri v (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import models + + +class PosSession(models.Model): + """Inherited pos session for loading quantity fields from product""" + _inherit = 'pos.session' + + def _loader_params_product_product(self): + """Load forcast and on hand quantity field to pos session. + :return dict: returns dictionary of field parameters for the + product model + """ + result = super()._loader_params_product_product() + result['search_params']['fields'].append('qty_available') + result['search_params']['fields'].append('virtual_available') + return result diff --git a/pos_restrict_product_stock/models/res_config_settings.py b/pos_restrict_product_stock/models/res_config_settings.py new file mode 100644 index 000000000..3ac859f76 --- /dev/null +++ b/pos_restrict_product_stock/models/res_config_settings.py @@ -0,0 +1,73 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Gayathri v (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import api, fields, models + + +class ResConfigSettings(models.TransientModel): + """Inherited res configuration setting for adding fields for + restricting out-of-stock products""" + _inherit = 'res.config.settings' + + is_display_stock = fields.Boolean(string="Display Stock in POS", + readonly=False, + help="Enable if you want to show the " + "quantity of products.") + is_restrict_product = fields.Boolean( + string="Restrict Product Out of Stock in POS", readonly=False, + help="Enable if you want restrict of stock product from POS") + stock_type = fields.Selection([('qty_on_hand', 'Qty on Hand'), + ('virtual_qty', 'Virtual Qty'), + ('both', 'Both')], string="Stock Type", + readonly=False, + help="In which quantity type you" + "have to restrict and display in POS") + + @api.model + def set_values(self): + """ Set values for the fields """ + self.env['ir.config_parameter'].sudo(). \ + set_param('pos_restrict_product_stock.is_display_stock', + self.is_display_stock) + self.env['ir.config_parameter'].sudo(). \ + set_param('pos_restrict_product_stock.is_restrict_product', + self.is_restrict_product) + self.env['ir.config_parameter'].sudo(). \ + set_param('pos_restrict_product_stock.stock_type', + self.stock_type) + return super().set_values() + + def get_values(self): + """Getting the values from the transient model""" + res = super().get_values() + params = self.env['ir.config_parameter'].sudo().get_param + is_display_stock = params('pos_restrict_product_stock.' + 'is_display_stock') + is_restrict_product = params('pos_restrict_product_stock.' + 'is_restrict_product') + stock_type = params('pos_restrict_product_stock.' + 'stock_type') + res.update( + is_display_stock=is_display_stock, + is_restrict_product=is_restrict_product, + stock_type=stock_type + ) + return res diff --git a/pos_restrict_product_stock/static/description/assets/icons/check.png b/pos_restrict_product_stock/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/icons/check.png differ diff --git a/pos_restrict_product_stock/static/description/assets/icons/chevron.png b/pos_restrict_product_stock/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/icons/chevron.png differ diff --git a/pos_restrict_product_stock/static/description/assets/icons/cogs.png b/pos_restrict_product_stock/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/icons/cogs.png differ diff --git a/pos_restrict_product_stock/static/description/assets/icons/consultation.png b/pos_restrict_product_stock/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/icons/consultation.png differ diff --git a/pos_restrict_product_stock/static/description/assets/icons/ecom-black.png b/pos_restrict_product_stock/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/icons/ecom-black.png differ diff --git a/pos_restrict_product_stock/static/description/assets/icons/education-black.png b/pos_restrict_product_stock/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/icons/education-black.png differ diff --git a/pos_restrict_product_stock/static/description/assets/icons/hotel-black.png b/pos_restrict_product_stock/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/icons/hotel-black.png differ diff --git a/pos_restrict_product_stock/static/description/assets/icons/license.png b/pos_restrict_product_stock/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/icons/license.png differ diff --git a/pos_restrict_product_stock/static/description/assets/icons/lifebuoy.png b/pos_restrict_product_stock/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/icons/lifebuoy.png differ diff --git a/pos_restrict_product_stock/static/description/assets/icons/logo.png b/pos_restrict_product_stock/static/description/assets/icons/logo.png new file mode 100755 index 000000000..478462d3e Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/icons/logo.png differ diff --git a/pos_restrict_product_stock/static/description/assets/icons/manufacturing-black.png b/pos_restrict_product_stock/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/icons/manufacturing-black.png differ diff --git a/pos_restrict_product_stock/static/description/assets/icons/pos-black.png b/pos_restrict_product_stock/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/icons/pos-black.png differ diff --git a/pos_restrict_product_stock/static/description/assets/icons/puzzle.png b/pos_restrict_product_stock/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/icons/puzzle.png differ diff --git a/pos_restrict_product_stock/static/description/assets/icons/restaurant-black.png b/pos_restrict_product_stock/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/icons/restaurant-black.png differ diff --git a/pos_restrict_product_stock/static/description/assets/icons/service-black.png b/pos_restrict_product_stock/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/icons/service-black.png differ diff --git a/pos_restrict_product_stock/static/description/assets/icons/trading-black.png b/pos_restrict_product_stock/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/icons/trading-black.png differ diff --git a/pos_restrict_product_stock/static/description/assets/icons/training.png b/pos_restrict_product_stock/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/icons/training.png differ diff --git a/pos_restrict_product_stock/static/description/assets/icons/update.png b/pos_restrict_product_stock/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/icons/update.png differ diff --git a/pos_restrict_product_stock/static/description/assets/icons/user.png b/pos_restrict_product_stock/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/icons/user.png differ diff --git a/pos_restrict_product_stock/static/description/assets/icons/wrench.png b/pos_restrict_product_stock/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/icons/wrench.png differ diff --git a/pos_restrict_product_stock/static/description/assets/misc/categories.png b/pos_restrict_product_stock/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/misc/categories.png differ diff --git a/pos_restrict_product_stock/static/description/assets/misc/check-box.png b/pos_restrict_product_stock/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/misc/check-box.png differ diff --git a/pos_restrict_product_stock/static/description/assets/misc/compass.png b/pos_restrict_product_stock/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/misc/compass.png differ diff --git a/pos_restrict_product_stock/static/description/assets/misc/corporate.png b/pos_restrict_product_stock/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/misc/corporate.png differ diff --git a/pos_restrict_product_stock/static/description/assets/misc/customer-support.png b/pos_restrict_product_stock/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/misc/customer-support.png differ diff --git a/pos_restrict_product_stock/static/description/assets/misc/cybrosys-logo.png b/pos_restrict_product_stock/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/misc/cybrosys-logo.png differ diff --git a/pos_restrict_product_stock/static/description/assets/misc/features.png b/pos_restrict_product_stock/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/misc/features.png differ diff --git a/pos_restrict_product_stock/static/description/assets/misc/logo.png b/pos_restrict_product_stock/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/misc/logo.png differ diff --git a/pos_restrict_product_stock/static/description/assets/misc/pictures.png b/pos_restrict_product_stock/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/misc/pictures.png differ diff --git a/pos_restrict_product_stock/static/description/assets/misc/pie-chart.png b/pos_restrict_product_stock/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/misc/pie-chart.png differ diff --git a/pos_restrict_product_stock/static/description/assets/misc/right-arrow.png b/pos_restrict_product_stock/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/misc/right-arrow.png differ diff --git a/pos_restrict_product_stock/static/description/assets/misc/star.png b/pos_restrict_product_stock/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/misc/star.png differ diff --git a/pos_restrict_product_stock/static/description/assets/misc/support.png b/pos_restrict_product_stock/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/misc/support.png differ diff --git a/pos_restrict_product_stock/static/description/assets/misc/whatsapp.png b/pos_restrict_product_stock/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/misc/whatsapp.png differ diff --git a/pos_restrict_product_stock/static/description/assets/modules/1.jpg b/pos_restrict_product_stock/static/description/assets/modules/1.jpg new file mode 100644 index 000000000..e7985dc61 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/modules/1.jpg differ diff --git a/pos_restrict_product_stock/static/description/assets/modules/2.png b/pos_restrict_product_stock/static/description/assets/modules/2.png new file mode 100644 index 000000000..5c8646fae Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/modules/2.png differ diff --git a/pos_restrict_product_stock/static/description/assets/modules/3.png b/pos_restrict_product_stock/static/description/assets/modules/3.png new file mode 100644 index 000000000..6a0795416 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/modules/3.png differ diff --git a/pos_restrict_product_stock/static/description/assets/modules/4.png b/pos_restrict_product_stock/static/description/assets/modules/4.png new file mode 100644 index 000000000..f640cfa3a Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/modules/4.png differ diff --git a/pos_restrict_product_stock/static/description/assets/modules/5.gif b/pos_restrict_product_stock/static/description/assets/modules/5.gif new file mode 100644 index 000000000..8f40aab85 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/modules/5.gif differ diff --git a/pos_restrict_product_stock/static/description/assets/modules/5.png b/pos_restrict_product_stock/static/description/assets/modules/5.png new file mode 100755 index 000000000..ebbbfb663 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/modules/5.png differ diff --git a/pos_restrict_product_stock/static/description/assets/modules/6.png b/pos_restrict_product_stock/static/description/assets/modules/6.png new file mode 100644 index 000000000..f7be9edcf Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/modules/6.png differ diff --git a/pos_restrict_product_stock/static/description/assets/screenshots/Screenshot2.png b/pos_restrict_product_stock/static/description/assets/screenshots/Screenshot2.png new file mode 100644 index 000000000..1af9b66cd Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/screenshots/Screenshot2.png differ diff --git a/pos_restrict_product_stock/static/description/assets/screenshots/Screenshot3.png b/pos_restrict_product_stock/static/description/assets/screenshots/Screenshot3.png new file mode 100644 index 000000000..6de56187a Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/screenshots/Screenshot3.png differ diff --git a/pos_restrict_product_stock/static/description/assets/screenshots/Screenshot4.png b/pos_restrict_product_stock/static/description/assets/screenshots/Screenshot4.png new file mode 100644 index 000000000..eaaf1c019 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/screenshots/Screenshot4.png differ diff --git a/pos_restrict_product_stock/static/description/assets/screenshots/Screenshot5.png b/pos_restrict_product_stock/static/description/assets/screenshots/Screenshot5.png new file mode 100644 index 000000000..58db6650f Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/screenshots/Screenshot5.png differ diff --git a/pos_restrict_product_stock/static/description/assets/screenshots/Screenshot6.png b/pos_restrict_product_stock/static/description/assets/screenshots/Screenshot6.png new file mode 100644 index 000000000..ed297acfb Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/screenshots/Screenshot6.png differ diff --git a/pos_restrict_product_stock/static/description/assets/screenshots/Screenshot7.png b/pos_restrict_product_stock/static/description/assets/screenshots/Screenshot7.png new file mode 100644 index 000000000..16458ad8b Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/screenshots/Screenshot7.png differ diff --git a/pos_restrict_product_stock/static/description/assets/screenshots/hero.gif b/pos_restrict_product_stock/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..6ac6e7ba2 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/screenshots/hero.gif differ diff --git a/pos_restrict_product_stock/static/description/assets/screenshots/screenshot 1.png b/pos_restrict_product_stock/static/description/assets/screenshots/screenshot 1.png new file mode 100644 index 000000000..d11fc11e7 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/screenshots/screenshot 1.png differ diff --git a/pos_restrict_product_stock/static/description/banner.jpg b/pos_restrict_product_stock/static/description/banner.jpg new file mode 100644 index 000000000..73b32e5bd Binary files /dev/null and b/pos_restrict_product_stock/static/description/banner.jpg differ diff --git a/pos_restrict_product_stock/static/description/icon.png b/pos_restrict_product_stock/static/description/icon.png new file mode 100644 index 000000000..3f4ec1ccb Binary files /dev/null and b/pos_restrict_product_stock/static/description/icon.png differ diff --git a/pos_restrict_product_stock/static/description/index.html b/pos_restrict_product_stock/static/description/index.html new file mode 100644 index 000000000..8eed939a9 --- /dev/null +++ b/pos_restrict_product_stock/static/description/index.html @@ -0,0 +1,694 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+ +
+
+
+
+ + + +
+
+
+

+ Display Stock in POS | Restrict Out-of-Stock Products in + POS

+

+ Restrict Out of + Stock Product from PoS session and Display the Stock. +

+ +
+
+
+ + + +
+
+ +
+

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ This module enhances your Point of Sale by providing real-time + visibility into product availability, displaying both the on-hand + quantity and virtual quantity. Moreover, it empowers you to optimize + your ordering process by seamlessly restricting the selection of + out-of-stock products within the POS system. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ + Display both on-hand quantity and Virtual quantity of every product. +
+
+ + Restrict out of stock products from ordering them. +
+
+ + We can choose which type of (on-hand and virtual) quantity you have to be visible in POS. +
+
+ + We can also specify which type of (on-hand and virtual) quantity you have to restrict if the product is out of stock. +
+
+
+ + +
+
+ +
+

+ Screenshots +

+
+
+
+
+

+ Do the configuration + from POS settings

+

+ Go to PoS Settings -> + Enable Display Stock in POS and select which type of quantity + you have to be visible in session. If you + want to restrict out of stock products from ordering based on + the quantity type you selected.

+ +
+
+

+ Display on-hand + quantity.

+

+ If we selected type is + on hand it visible in left-top of product item.

+ +
+
+

+ Display out of stock + in different color.

+

+ If the quantity of the + product is zero then it visible in different color.

+ +
+
+

+ Restrict out of stock + products.

+

+ If you try to order out + of stock product an error popup will render, still you want to + order the product then click order + button.

+ +
+
+

+ The out-of-stock + product is added to orderline.

+ +
+ +
+

+ Virtual + Quantity.

+

+ If you selected the + virtual quantity for displaying it will display right-top of + each product item and its out of stock + products in different color.

+ +
+ +
+

+ Display the both quantity.

+

+ If you selected both type to display then it visible both type + of quantity.

+ +
+
+
+ + + +
+
+ +
+

+ Related + Products +

+
+
+
+

Suggested Products

+
+ + +
+
+ + +
+
+ +
+

+ Our Services +

+
+
+
+
+
+ +
+
+ Odoo + Customization
+
+
+
+ +
+
+ Odoo + Implementation
+
+
+
+ +
+
+ Odoo + Support
+
+ +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+
+ + + + +
+
+ +
+

+ Our + Industries +

+
+
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

+
+
+
+
+ + + +
+
+ +
+

+ Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? + Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+ +91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ diff --git a/pos_restrict_product_stock/static/src/css/display_stock.css b/pos_restrict_product_stock/static/src/css/display_stock.css new file mode 100644 index 000000000..1f44b8669 --- /dev/null +++ b/pos_restrict_product_stock/static/src/css/display_stock.css @@ -0,0 +1,36 @@ +.display_qty{ + background:#714B67; + position:absolute; + top:0; + left:0; + width:30px; + height:20px; + border-radius: 3px; + text-align:center; + font-weight: bold; + font-size: 14px; + color:white; + display:flex; + align-items:center; + justify-content:center; +} +.display_qty.not-available,.display_virtual.not-available{ + background: #808080; +} +.display_virtual{ + background:#017e84; + position:absolute; + top:0; + right:0; + width:30px; + height:20px; + border-radius: 3px; + text-align:center; + font-weight: bold; + font-size: 14px; + color:white; + display:flex; + align-items:center; + justify-content:center; + margin-right:57px; +} diff --git a/pos_restrict_product_stock/static/src/js/ProductScreen.js b/pos_restrict_product_stock/static/src/js/ProductScreen.js new file mode 100644 index 000000000..ba8867e22 --- /dev/null +++ b/pos_restrict_product_stock/static/src/js/ProductScreen.js @@ -0,0 +1,28 @@ +/** @odoo-module **/ +/* + * This file is used to restrict out of stock product from ordering and show restrict popup + */ +import Registries from 'point_of_sale.Registries'; +import ProductScreen from 'point_of_sale.ProductScreen'; +import { Gui } from 'point_of_sale.Gui'; +var models = require('point_of_sale.models'); +models.load_fields('product.product', ['qty_available','virtual_available']); +const RestrictProductScreen = (ProductScreen) => class RestrictProductScreen extends ProductScreen { + async _clickProduct(event) { + // Overriding product item click to restrict product out of stock + const product = event.detail; + var type = this.env.pos.config.stock_type + if (this.env.pos.config.is_restrict_product && ((type == 'qty_on_hand') && (product.qty_available <= 0)) | ((type == 'virtual_qty') && (product.virtual_available <= 0)) | + ((product.qty_available <= 0) && (product.virtual_available <= 0))) { + // If the product restriction is activated in the settings and quantity is out stock, it show the restrict popup. + this.showPopup("RestrictStockPopup", { + body: product.display_name, + pro_id: product.id + }); + } + else{ + await super._clickProduct(event) + } + } +} +Registries.Component.extend(ProductScreen, RestrictProductScreen); diff --git a/pos_restrict_product_stock/static/src/js/RestrictStockPopup.js b/pos_restrict_product_stock/static/src/js/RestrictStockPopup.js new file mode 100644 index 000000000..d07b8eb5c --- /dev/null +++ b/pos_restrict_product_stock/static/src/js/RestrictStockPopup.js @@ -0,0 +1,17 @@ +/** @odoo-module **/ +/* + * This file is used to store a popup for stocks out of stock for forced orders. + */ +import AbstractAwaitablePopup from 'point_of_sale.AbstractAwaitablePopup'; +import Registries from 'point_of_sale.Registries'; + +class RestrictStockPopup extends AbstractAwaitablePopup { + _OrderProduct() { + // On clicking order product button on popup, it will add product to orderline + var product = this.env.pos.db.get_product_by_id(this.props.pro_id) + this.env.pos.get_order().add_product(product); + this.cancel(); + } +} +RestrictStockPopup.template = 'RestrictStockPopup'; +Registries.Component.add(RestrictStockPopup); diff --git a/pos_restrict_product_stock/static/src/xml/ProductItem.xml b/pos_restrict_product_stock/static/src/xml/ProductItem.xml new file mode 100644 index 000000000..56d4d0ae5 --- /dev/null +++ b/pos_restrict_product_stock/static/src/xml/ProductItem.xml @@ -0,0 +1,30 @@ + + + + + + + +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+
+
+
diff --git a/pos_restrict_product_stock/static/src/xml/RestrictStockPopup.xml b/pos_restrict_product_stock/static/src/xml/RestrictStockPopup.xml new file mode 100644 index 000000000..bf11f4241 --- /dev/null +++ b/pos_restrict_product_stock/static/src/xml/RestrictStockPopup.xml @@ -0,0 +1,24 @@ + + diff --git a/pos_restrict_product_stock/views/pos_config_views.xml b/pos_restrict_product_stock/views/pos_config_views.xml new file mode 100644 index 000000000..4673b10fa --- /dev/null +++ b/pos_restrict_product_stock/views/pos_config_views.xml @@ -0,0 +1,56 @@ + + + + + pos.config.form.view.inherit.pos_adyen + pos.config + + + +

Stock Configuration

+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pos_restrict_product_stock/views/res_config_settings_views.xml b/pos_restrict_product_stock/views/res_config_settings_views.xml new file mode 100644 index 000000000..aad946556 --- /dev/null +++ b/pos_restrict_product_stock/views/res_config_settings_views.xml @@ -0,0 +1,42 @@ + + + + + + pos.config.view.form.inherit.custom.receipts.for.pos + + pos.config + + + +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+