diff --git a/pos_restrict_product_stock/README.rst b/pos_restrict_product_stock/README.rst new file mode 100644 index 000000000..e3057cee5 --- /dev/null +++ b/pos_restrict_product_stock/README.rst @@ -0,0 +1,47 @@ +.. image:: https://img.shields.io/badge/licence-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: (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..084f44af0 --- /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: Raneesha M K (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..2fd13ea2a --- /dev/null +++ b/pos_restrict_product_stock/__manifest__.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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': '16.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/res_config_settings_views.xml'], + 'assets': { + 'point_of_sale.assets': [ + '/pos_restrict_product_stock/static/src/css/display_stock.css', + '/pos_restrict_product_stock/static/src/xml/ProductItem.xml', + '/pos_restrict_product_stock/static/src/xml/RestrictStockPopup.xml', + '/pos_restrict_product_stock/static/src/js/RestrictStockPopup.js', + '/pos_restrict_product_stock/static/src/js/ProductScreen.js', + ], + }, + '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..5381ad26f --- /dev/null +++ b/pos_restrict_product_stock/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 16.09.2023 +#### Version 16.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..5c3532a4b --- /dev/null +++ b/pos_restrict_product_stock/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 +from . import pos_session +from . import res_config_settings 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..d75455252 --- /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: Raneesha M K (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..3c0112128 --- /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: Raneesha M K (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..5da06aaf5 --- /dev/null +++ b/pos_restrict_product_stock/models/res_config_settings.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 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(related="pos_config_id.is_display_stock", + string="Display Stock in POS", + readonly=False, + help="Enable if you want to show the " + "quantity of products.") + is_restrict_product = fields.Boolean( + related="pos_config_id.is_restrict_product", + 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(related="pos_config_id.stock_type", + string="Stock Type", readonly=False, + help="In which quantity type you" + "have to restrict and display in POS") 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/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/m1.png b/pos_restrict_product_stock/static/description/assets/modules/m1.png new file mode 100644 index 000000000..5ecc4d883 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/modules/m1.png differ diff --git a/pos_restrict_product_stock/static/description/assets/modules/m2.png b/pos_restrict_product_stock/static/description/assets/modules/m2.png new file mode 100644 index 000000000..89ff6c635 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/modules/m2.png differ diff --git a/pos_restrict_product_stock/static/description/assets/modules/m3.png b/pos_restrict_product_stock/static/description/assets/modules/m3.png new file mode 100644 index 000000000..fd1f87699 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/modules/m3.png differ diff --git a/pos_restrict_product_stock/static/description/assets/modules/m4.png b/pos_restrict_product_stock/static/description/assets/modules/m4.png new file mode 100644 index 000000000..5514bb8d4 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/modules/m4.png differ diff --git a/pos_restrict_product_stock/static/description/assets/modules/m5.png b/pos_restrict_product_stock/static/description/assets/modules/m5.png new file mode 100644 index 000000000..38ea1f663 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/modules/m5.png differ diff --git a/pos_restrict_product_stock/static/description/assets/modules/m6.png b/pos_restrict_product_stock/static/description/assets/modules/m6.png new file mode 100644 index 000000000..f52b99646 Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/modules/m6.png 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..c4341f64e 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/assets/screenshots/Screenshot2.png b/pos_restrict_product_stock/static/description/assets/screenshots/Screenshot2.png new file mode 100644 index 000000000..b3c7cf4b4 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..a07874c40 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..b45aa851a 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..d288b5b7b 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..4679ab424 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..167e63e68 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/v16-hero.gif b/pos_restrict_product_stock/static/description/assets/screenshots/v16-hero.gif new file mode 100644 index 000000000..b453e515c Binary files /dev/null and b/pos_restrict_product_stock/static/description/assets/screenshots/v16-hero.gif 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..7db78033e 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..71d9abd14 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..7daf36d9b --- /dev/null +++ b/pos_restrict_product_stock/static/description/index.html @@ -0,0 +1,679 @@ +
+ +
+ +
+
+ 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 +

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

+ 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..c94346657 --- /dev/null +++ b/pos_restrict_product_stock/static/src/css/display_stock.css @@ -0,0 +1,29 @@ +.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_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 +} 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..c2098d9ff --- /dev/null +++ b/pos_restrict_product_stock/static/src/js/ProductScreen.js @@ -0,0 +1,26 @@ +/** @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'; + +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..6bd7b3e30 --- /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.selectedOrder.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..c4dfbc40d --- /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/res_config_settings_views.xml b/pos_restrict_product_stock/views/res_config_settings_views.xml new file mode 100644 index 000000000..f29849b54 --- /dev/null +++ b/pos_restrict_product_stock/views/res_config_settings_views.xml @@ -0,0 +1,59 @@ + + + + + + res.config.settings.view.form.inherit.pos.restrict.product.stock + + res.config.settings + + + +
+

Stock Configuration

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