diff --git a/pos_user_access_rights/README.rst b/pos_user_access_rights/README.rst new file mode 100644 index 000000000..e531eda2a --- /dev/null +++ b/pos_user_access_rights/README.rst @@ -0,0 +1,40 @@ +Pos Access Rights v16 +================================= +This module helps you to restrict point of sale access. + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developers: Cybrosys Techno Solutions odoo@cybrosys.com + Author : Sruthi Pavithran + +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_user_access_rights/__init__.py b/pos_user_access_rights/__init__.py new file mode 100644 index 000000000..57f2f10fe --- /dev/null +++ b/pos_user_access_rights/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models + diff --git a/pos_user_access_rights/__manifest__.py b/pos_user_access_rights/__manifest__.py new file mode 100644 index 000000000..cc383b1c1 --- /dev/null +++ b/pos_user_access_rights/__manifest__.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# + + +{ + 'name': 'Pos Access Rights', + 'version': '16.0.1.0.0', + 'summary': 'Restrict Accesses', + 'category': 'Point of Sale', + 'description': 'Restrict Point of Sale Access', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'point_of_sale'], + 'data': [ + 'views/res_users_view.xml' + ], + 'assets': { + 'point_of_sale.assets': [ + 'pos_user_access_rights/static/src/js/product_screen_buttons.js', + 'pos_user_access_rights/static/src/js/ticket_screen.js', + 'pos_user_access_rights/static/src/js/numpad.js', + 'pos_user_access_rights/static/src/js/plus_minus.js', + 'pos_user_access_rights/static/src/js/numpad_keys.js', + 'pos_user_access_rights/static/src/js/partner_payment.js' + ], + }, + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'application': False, + 'auto_install': False, +} diff --git a/pos_user_access_rights/doc/RELEASE_NOTES.md b/pos_user_access_rights/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..88794db09 --- /dev/null +++ b/pos_user_access_rights/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 07.03.2023 +#### Version 16.0.1.0.0 +#### ADD +Initial Commit Pos Access Rights + diff --git a/pos_user_access_rights/models/__init__.py b/pos_user_access_rights/models/__init__.py new file mode 100644 index 000000000..825cbe2f1 --- /dev/null +++ b/pos_user_access_rights/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() + +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import res_users diff --git a/pos_user_access_rights/models/res_users.py b/pos_user_access_rights/models/res_users.py new file mode 100644 index 000000000..baa845b9e --- /dev/null +++ b/pos_user_access_rights/models/res_users.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import models, fields + + +class AccessRightsUsers(models.Model): + """ Adding fields in to res users """ + _inherit = "res.users" + + disable_customer_selection = fields.Boolean(string="Disable Customer Selection", default=False) + disable_payment_button = fields.Boolean("Disable Payment Button", default=False) + hide_delete_button = fields.Boolean("Hide Delete Button", default=False) + disable_price_button = fields.Boolean("Disable Price Button", default=False) + disable_discount_button = fields.Boolean("Disable Discount Button", default=False) + disable_plus_minus_button = fields.Boolean("Disable Plus Minus Button", default=False) + disable_numpad = fields.Boolean("Disable Numpad", default=False) + hide_new_orders = fields.Boolean("Hide New Orders", default=False) + disable_remove_button = fields.Boolean("Disable Remove Button", default=False) + + +class PosSession(models.Model): + """Load fields into pos session.""" + _inherit = "pos.session" + + def _pos_ui_models_to_load(self): + """Load res.users model into pos session""" + result = super()._pos_ui_models_to_load() + result += [ + 'res.users', + ] + return result + + def _loader_params_res_users(self): + """load product.product parameters""" + result = super()._loader_params_res_users() + result['search_params']['fields'].extend( + ['disable_customer_selection', 'disable_payment_button', 'hide_delete_button', + 'disable_price_button', 'disable_discount_button', 'disable_plus_minus_button', + 'disable_numpad', + 'hide_new_orders', 'disable_remove_button']) + return result \ No newline at end of file diff --git a/pos_user_access_rights/static/description/assets/icons/check.png b/pos_user_access_rights/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/pos_user_access_rights/static/description/assets/icons/check.png differ diff --git a/pos_user_access_rights/static/description/assets/icons/chevron.png b/pos_user_access_rights/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/icons/chevron.png differ diff --git a/pos_user_access_rights/static/description/assets/icons/cogs.png b/pos_user_access_rights/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/icons/cogs.png differ diff --git a/pos_user_access_rights/static/description/assets/icons/consultation.png b/pos_user_access_rights/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/pos_user_access_rights/static/description/assets/icons/consultation.png differ diff --git a/pos_user_access_rights/static/description/assets/icons/ecom-black.png b/pos_user_access_rights/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/icons/ecom-black.png differ diff --git a/pos_user_access_rights/static/description/assets/icons/education-black.png b/pos_user_access_rights/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/pos_user_access_rights/static/description/assets/icons/education-black.png differ diff --git a/pos_user_access_rights/static/description/assets/icons/hotel-black.png b/pos_user_access_rights/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/pos_user_access_rights/static/description/assets/icons/hotel-black.png differ diff --git a/pos_user_access_rights/static/description/assets/icons/license.png b/pos_user_access_rights/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/pos_user_access_rights/static/description/assets/icons/license.png differ diff --git a/pos_user_access_rights/static/description/assets/icons/lifebuoy.png b/pos_user_access_rights/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/pos_user_access_rights/static/description/assets/icons/lifebuoy.png differ diff --git a/pos_user_access_rights/static/description/assets/icons/manufacturing-black.png b/pos_user_access_rights/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/pos_user_access_rights/static/description/assets/icons/manufacturing-black.png differ diff --git a/pos_user_access_rights/static/description/assets/icons/pos-black.png b/pos_user_access_rights/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/icons/pos-black.png differ diff --git a/pos_user_access_rights/static/description/assets/icons/puzzle.png b/pos_user_access_rights/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/icons/puzzle.png differ diff --git a/pos_user_access_rights/static/description/assets/icons/restaurant-black.png b/pos_user_access_rights/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/icons/restaurant-black.png differ diff --git a/pos_user_access_rights/static/description/assets/icons/service-black.png b/pos_user_access_rights/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/pos_user_access_rights/static/description/assets/icons/service-black.png differ diff --git a/pos_user_access_rights/static/description/assets/icons/trading-black.png b/pos_user_access_rights/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/icons/trading-black.png differ diff --git a/pos_user_access_rights/static/description/assets/icons/training.png b/pos_user_access_rights/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/pos_user_access_rights/static/description/assets/icons/training.png differ diff --git a/pos_user_access_rights/static/description/assets/icons/update.png b/pos_user_access_rights/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/pos_user_access_rights/static/description/assets/icons/update.png differ diff --git a/pos_user_access_rights/static/description/assets/icons/user.png b/pos_user_access_rights/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/pos_user_access_rights/static/description/assets/icons/user.png differ diff --git a/pos_user_access_rights/static/description/assets/icons/wrench.png b/pos_user_access_rights/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/pos_user_access_rights/static/description/assets/icons/wrench.png differ diff --git a/pos_user_access_rights/static/description/assets/misc/categories.png b/pos_user_access_rights/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/misc/categories.png differ diff --git a/pos_user_access_rights/static/description/assets/misc/check-box.png b/pos_user_access_rights/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/misc/check-box.png differ diff --git a/pos_user_access_rights/static/description/assets/misc/compass.png b/pos_user_access_rights/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/pos_user_access_rights/static/description/assets/misc/compass.png differ diff --git a/pos_user_access_rights/static/description/assets/misc/corporate.png b/pos_user_access_rights/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/pos_user_access_rights/static/description/assets/misc/corporate.png differ diff --git a/pos_user_access_rights/static/description/assets/misc/customer-support.png b/pos_user_access_rights/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/pos_user_access_rights/static/description/assets/misc/customer-support.png differ diff --git a/pos_user_access_rights/static/description/assets/misc/cybrosys-logo.png b/pos_user_access_rights/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/pos_user_access_rights/static/description/assets/misc/cybrosys-logo.png differ diff --git a/pos_user_access_rights/static/description/assets/misc/features.png b/pos_user_access_rights/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/misc/features.png differ diff --git a/pos_user_access_rights/static/description/assets/misc/logo.png b/pos_user_access_rights/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/pos_user_access_rights/static/description/assets/misc/logo.png differ diff --git a/pos_user_access_rights/static/description/assets/misc/pictures.png b/pos_user_access_rights/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/misc/pictures.png differ diff --git a/pos_user_access_rights/static/description/assets/misc/pie-chart.png b/pos_user_access_rights/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/misc/pie-chart.png differ diff --git a/pos_user_access_rights/static/description/assets/misc/right-arrow.png b/pos_user_access_rights/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/misc/right-arrow.png differ diff --git a/pos_user_access_rights/static/description/assets/misc/star.png b/pos_user_access_rights/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/pos_user_access_rights/static/description/assets/misc/star.png differ diff --git a/pos_user_access_rights/static/description/assets/misc/support.png b/pos_user_access_rights/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/misc/support.png differ diff --git a/pos_user_access_rights/static/description/assets/misc/whatsapp.png b/pos_user_access_rights/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/misc/whatsapp.png differ diff --git a/pos_user_access_rights/static/description/assets/modules/11.png b/pos_user_access_rights/static/description/assets/modules/11.png new file mode 100644 index 000000000..5238bdeab Binary files /dev/null and b/pos_user_access_rights/static/description/assets/modules/11.png differ diff --git a/pos_user_access_rights/static/description/assets/modules/12.png b/pos_user_access_rights/static/description/assets/modules/12.png new file mode 100644 index 000000000..1ae7cfe3b Binary files /dev/null and b/pos_user_access_rights/static/description/assets/modules/12.png differ diff --git a/pos_user_access_rights/static/description/assets/modules/13.png b/pos_user_access_rights/static/description/assets/modules/13.png new file mode 100644 index 000000000..3c3ff1afb Binary files /dev/null and b/pos_user_access_rights/static/description/assets/modules/13.png differ diff --git a/pos_user_access_rights/static/description/assets/modules/14.png b/pos_user_access_rights/static/description/assets/modules/14.png new file mode 100644 index 000000000..3fae4631e Binary files /dev/null and b/pos_user_access_rights/static/description/assets/modules/14.png differ diff --git a/pos_user_access_rights/static/description/assets/modules/15.gif b/pos_user_access_rights/static/description/assets/modules/15.gif new file mode 100644 index 000000000..2a5f8e659 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/modules/15.gif differ diff --git a/pos_user_access_rights/static/description/assets/modules/16.png b/pos_user_access_rights/static/description/assets/modules/16.png new file mode 100644 index 000000000..7f2815273 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/modules/16.png differ diff --git a/pos_user_access_rights/static/description/assets/screenshots/1.png b/pos_user_access_rights/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..82c5d518c Binary files /dev/null and b/pos_user_access_rights/static/description/assets/screenshots/1.png differ diff --git a/pos_user_access_rights/static/description/assets/screenshots/10.png b/pos_user_access_rights/static/description/assets/screenshots/10.png new file mode 100644 index 000000000..5dc0fc477 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/screenshots/10.png differ diff --git a/pos_user_access_rights/static/description/assets/screenshots/11.png b/pos_user_access_rights/static/description/assets/screenshots/11.png new file mode 100644 index 000000000..73c24b548 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/screenshots/11.png differ diff --git a/pos_user_access_rights/static/description/assets/screenshots/12.png b/pos_user_access_rights/static/description/assets/screenshots/12.png new file mode 100644 index 000000000..654297e6a Binary files /dev/null and b/pos_user_access_rights/static/description/assets/screenshots/12.png differ diff --git a/pos_user_access_rights/static/description/assets/screenshots/13.png b/pos_user_access_rights/static/description/assets/screenshots/13.png new file mode 100644 index 000000000..4c45efa40 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/screenshots/13.png differ diff --git a/pos_user_access_rights/static/description/assets/screenshots/14.png b/pos_user_access_rights/static/description/assets/screenshots/14.png new file mode 100644 index 000000000..65f3fb83a Binary files /dev/null and b/pos_user_access_rights/static/description/assets/screenshots/14.png differ diff --git a/pos_user_access_rights/static/description/assets/screenshots/15.png b/pos_user_access_rights/static/description/assets/screenshots/15.png new file mode 100644 index 000000000..40c5ce1f5 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/screenshots/15.png differ diff --git a/pos_user_access_rights/static/description/assets/screenshots/16.png b/pos_user_access_rights/static/description/assets/screenshots/16.png new file mode 100644 index 000000000..660570538 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/screenshots/16.png differ diff --git a/pos_user_access_rights/static/description/assets/screenshots/17.png b/pos_user_access_rights/static/description/assets/screenshots/17.png new file mode 100644 index 000000000..c5a40d3e4 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/screenshots/17.png differ diff --git a/pos_user_access_rights/static/description/assets/screenshots/18.png b/pos_user_access_rights/static/description/assets/screenshots/18.png new file mode 100644 index 000000000..56fb89b1d Binary files /dev/null and b/pos_user_access_rights/static/description/assets/screenshots/18.png differ diff --git a/pos_user_access_rights/static/description/assets/screenshots/2.png b/pos_user_access_rights/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..9db7d6982 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/screenshots/2.png differ diff --git a/pos_user_access_rights/static/description/assets/screenshots/3.png b/pos_user_access_rights/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..1918085c1 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/screenshots/3.png differ diff --git a/pos_user_access_rights/static/description/assets/screenshots/4.png b/pos_user_access_rights/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..6fb71c0db Binary files /dev/null and b/pos_user_access_rights/static/description/assets/screenshots/4.png differ diff --git a/pos_user_access_rights/static/description/assets/screenshots/5.png b/pos_user_access_rights/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..7ec04d881 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/screenshots/5.png differ diff --git a/pos_user_access_rights/static/description/assets/screenshots/6.png b/pos_user_access_rights/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..f92c6cf1a Binary files /dev/null and b/pos_user_access_rights/static/description/assets/screenshots/6.png differ diff --git a/pos_user_access_rights/static/description/assets/screenshots/7.png b/pos_user_access_rights/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..e3f41904e Binary files /dev/null and b/pos_user_access_rights/static/description/assets/screenshots/7.png differ diff --git a/pos_user_access_rights/static/description/assets/screenshots/8.png b/pos_user_access_rights/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..17470a983 Binary files /dev/null and b/pos_user_access_rights/static/description/assets/screenshots/8.png differ diff --git a/pos_user_access_rights/static/description/assets/screenshots/9.png b/pos_user_access_rights/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..097266c4d Binary files /dev/null and b/pos_user_access_rights/static/description/assets/screenshots/9.png differ diff --git a/pos_user_access_rights/static/description/assets/screenshots/hero.gif b/pos_user_access_rights/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..7282362cc Binary files /dev/null and b/pos_user_access_rights/static/description/assets/screenshots/hero.gif differ diff --git a/pos_user_access_rights/static/description/banner.png b/pos_user_access_rights/static/description/banner.png new file mode 100644 index 000000000..9388eb338 Binary files /dev/null and b/pos_user_access_rights/static/description/banner.png differ diff --git a/pos_user_access_rights/static/description/icon.png b/pos_user_access_rights/static/description/icon.png new file mode 100644 index 000000000..961b15715 Binary files /dev/null and b/pos_user_access_rights/static/description/icon.png differ diff --git a/pos_user_access_rights/static/description/index.html b/pos_user_access_rights/static/description/index.html new file mode 100644 index 000000000..d919abe37 --- /dev/null +++ b/pos_user_access_rights/static/description/index.html @@ -0,0 +1,574 @@ +
+ +
+ +
+
+ Community +
+
+
+ +
+
+
+ +

POS ACCESS RIGHTS

+

Restrict Point of Sale Access

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

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ This module helps to Enable/Disable or Hide buttons in pos screen +
+
+ + + +
+
+ +
+

Features +

+
+
+
+ +
+ + Enable/Disable Customer Selection button in POS +
+
+ + Enable/Disable Payment button in POS +
+
+ + Enable/Disable Price button in POS +
+
+ + Enable/Disable Discount button in POS +
+
+ + Enable/Disable Plus-Minus button in POS +
+
+ + Enable/Disable Numpad in POS +
+
+ + Enable/Disable Remove button in POS +
+
+ + Hide Delete button in POS TicketScreen +
+
+ + Hide New Order button in POS TicketScreen +
+ +
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+ +
+

Disable Option in POS +

+

Go to Users, enable disable customer selection

+ +

The Customer Selection button has been disabled after being clicked.

+ +

Go to Users, enable disable payment button

+ +

The Payment button has been disabled after being clicked.

+ +

Go to Users, enable disable price button

+ +

The Pricing button has been deactivated after being clicked.

+ +

Go to Users, enable disable discount button

+ +

The Discount button has been disabled after being clicked.

+ +

Go to Users, enable disable plus minus button

+ +

The Plus-Minus button has been disabled after being clicked.

+ +

Go to Users, enable disable numpad

+ +

The Numpad has been disabled after being clicked.

+ +

Go to Users, enable disable remove button

+ +

The Remove button has been disabled after being clicked.

+ +

Hide Button Option in POS +

+

Go to Users, enable hide delete button in TicketScreen

+ +

The Delete button is hide now.

+ +

Go to Users, enable hide new orders button in TicketScreen

+ +

The New Order button is hide now.

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

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

+
+
+
+
+
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/pos_user_access_rights/static/src/js/numpad.js b/pos_user_access_rights/static/src/js/numpad.js new file mode 100644 index 000000000..710a6e2d0 --- /dev/null +++ b/pos_user_access_rights/static/src/js/numpad.js @@ -0,0 +1,65 @@ +odoo.define('pos_user_access_rights.numpad', function (require) { +"use strict"; +const Registries = require('point_of_sale.Registries'); +const NumpadWidget = require('point_of_sale.NumpadWidget'); + const numpad = (NumpadWidget) => + class extends NumpadWidget { + get hasPriceControlRights() { + let disableButton = false; + const disablePriceButton = this.env.pos.res_users.disable_price_button; // access the value of disable price button field from res users + if (disablePriceButton) { + disableButton = true; + } + if (disableButton) { + const buttonEl = document.querySelector(".price"); // select the price button using selector + if (buttonEl) { + buttonEl.disabled = true; + buttonEl.classList.add('disabled'); // add class disabled to disable the button when the field is enabled + } + } else { + return super.hasPriceControlRights; + } + } + + + get hasManualDiscount() { + let disableButton = false; + const disableDiscountButton = this.env.pos.res_users.disable_discount_button; // access the disable discount button field from res users + if (disableDiscountButton) { + disableButton = true; + } + if (disableButton) { + const buttonEl = document.querySelector(".discount"); // select the discount button using selector + if (buttonEl) { + buttonEl.disabled = true; + buttonEl.classList.add('disabled'); // add class disabled to disable the button when the field is enabled + } + } else { + return super.hasManualDiscount; + } + } + + sendInput(key) { + let disableButton = false; + const disableNumpad = this.env.pos.res_users.disable_remove_button; // access the disable remove button field from res users + if (disableNumpad && key === 'Backspace') { // it only check the backspace key + disableButton = true; + } + if (disableButton) { + const buttonEl = document.querySelector(".numpad-backspace"); // select the backspace button using the selector + if (buttonEl) { + buttonEl.disabled = true; + buttonEl.classList.add('disabled'); // add class disabled to disable the button when the field is enabled + buttonEl.style.cursor = "not-allowed"; // add style to the button to disallow the cursor + buttonEl.style.backgroundColor = '#C9CCD2'; // add style to the button to provide background color + } + } else { + super.sendInput(key); + } +} + } + Registries.Component.extend(NumpadWidget, numpad); + return numpad + +}); + diff --git a/pos_user_access_rights/static/src/js/numpad_keys.js b/pos_user_access_rights/static/src/js/numpad_keys.js new file mode 100644 index 000000000..5a5a8e8a8 --- /dev/null +++ b/pos_user_access_rights/static/src/js/numpad_keys.js @@ -0,0 +1,32 @@ +odoo.define('pos_user_access_rights.numpad_keys', function (require) { +"use strict"; +const Registries = require('point_of_sale.Registries'); +const NumpadWidget = require('point_of_sale.NumpadWidget'); + const numpad = (NumpadWidget) => + class extends NumpadWidget { + +sendInput(key) { + let disableButton = false; + const disableNumpad = this.env.pos.res_users.disable_numpad; // access the disable numpad field from res users + if (disableNumpad && key !== 'Backspace' && key !== '-') { + disableButton = true; + } + if (disableButton) { + const buttonEls = document.querySelectorAll(".number-char"); // select the numbers in numpad using class name + buttonEls.forEach((buttonEl) => { + if (buttonEl.innerText !== 'Backspace' && buttonEl.innerText !== '-') { // condition to select only the numbers in numpad + buttonEl.disabled = true; + buttonEl.classList.add('disabled'); // add class disabled to disable the button + buttonEl.style.cursor = "not-allowed"; // add style to the button to disallow the cursor + buttonEl.style.backgroundColor = '#C9CCD2'; // add style to the button to provide background color + } + }); + } else { + super.sendInput(key); + } +} + } + Registries.Component.extend(NumpadWidget, numpad); + return numpad + +}); \ No newline at end of file diff --git a/pos_user_access_rights/static/src/js/partner_payment.js b/pos_user_access_rights/static/src/js/partner_payment.js new file mode 100644 index 000000000..cf7723184 --- /dev/null +++ b/pos_user_access_rights/static/src/js/partner_payment.js @@ -0,0 +1,27 @@ +odoo.define('pos_user_access_rights.partner_payment', function (require) { +"use strict"; +const Registries = require('point_of_sale.Registries'); +const PaymentScreen = require('point_of_sale.PaymentScreen'); + +const partner = (PaymentScreen) => + class extends PaymentScreen { + async selectPartner() { + let disableButton = false; + const disablePaymentCustomer = this.env.pos.res_users.disable_customer_selection; // access disable customer selection field from res users + if (disablePaymentCustomer) { + disableButton = true; + } + if (disableButton) { + const buttonEl = document.querySelector(".partner-button .button"); // select customer selection button using class name + if (buttonEl) { + buttonEl.classList.add("disabled"); // add class disabled to disable the button + buttonEl.style.cursor = "not-allowed"; // add style to the button to disallow the cursor + buttonEl.style.backgroundColor = '#C9CCD2'; // add style to the button to provide background color + } + } else { + return super.selectPartner(); + } + } + } +Registries.Component.extend(PaymentScreen, partner); +}); \ No newline at end of file diff --git a/pos_user_access_rights/static/src/js/plus_minus.js b/pos_user_access_rights/static/src/js/plus_minus.js new file mode 100644 index 000000000..df8a3437c --- /dev/null +++ b/pos_user_access_rights/static/src/js/plus_minus.js @@ -0,0 +1,32 @@ +odoo.define('pos_user_access_rights.plus_minus', function (require) { +"use strict"; +const Registries = require('point_of_sale.Registries'); +const NumpadWidget = require('point_of_sale.NumpadWidget'); + + + const button = (NumpadWidget) => + class extends NumpadWidget { + sendInput(key) { + let disableButton = false; + const disable_Plus_Minus_Button = this.env.pos.res_users.disable_plus_minus_button; // access disable plus minus button field from res users + if (disable_Plus_Minus_Button && key === '-') { // it only select the plus minus key + disableButton = true; + } + if (disableButton) { + const buttonEl = document.querySelector(".numpad-minus"); // select the numpad plus minus button using class name + if (buttonEl) { + buttonEl.disabled = true; + buttonEl.classList.add('disabled'); // add class disabled to disable the button + buttonEl.style.cursor = "not-allowed"; // add style to the button to disallow the cursor + buttonEl.style.backgroundColor = '#C9CCD2'; // add style to the button to provide background color + } + } else { + super.sendInput(key); + } +} + + } + Registries.Component.extend(NumpadWidget, button); + return button + +}); \ No newline at end of file diff --git a/pos_user_access_rights/static/src/js/product_screen_buttons.js b/pos_user_access_rights/static/src/js/product_screen_buttons.js new file mode 100644 index 000000000..05745cad0 --- /dev/null +++ b/pos_user_access_rights/static/src/js/product_screen_buttons.js @@ -0,0 +1,59 @@ +odoo.define('pos_user_access_rights.product_screen_buttons', function (require) { +"use strict"; +var {PosGlobalState,OrderLIne} = require('point_of_sale.models'); +const Registries = require('point_of_sale.Registries'); +const ProductScreen = require('point_of_sale.ProductScreen'); +const NewPosGlobalState = (PosGlobalState) => class NewPosGlobalState extends PosGlobalState { + + async _processData(loadedData){ + await super._processData(...arguments); + this.res_users = loadedData['res.users']; + } +} +Registries.Model.extend(PosGlobalState,NewPosGlobalState) + + + const pay = (ProductScreen) => + class extends ProductScreen { + async _onClickPay() { + let disableButton = false; + const disablePaymentSelection = this.env.pos.res_users.disable_payment_button; // access the disable payment selection field from res users + if (disablePaymentSelection) { + disableButton = true; + } + if (disableButton) { + const buttonEl = document.querySelector(".button.pay.validation"); // select the payment button using class name + console.log(buttonEl) + if (buttonEl) { + buttonEl.classList.add('disabled'); // add class disabled to disable the button + buttonEl.style.cursor = "not-allowed"; // add style to the button to disallow the cursor + buttonEl.style.backgroundColor = '#C9CCD2'; // add style to the button to provide background color + + } + } else { + return super._onClickPay(); + } +} + +async onClickPartner() { + let disableButton = false; + const disableCustomerSelection = this.env.pos.res_users.disable_customer_selection; // access disable customer selection field from res users + if (disableCustomerSelection) { + disableButton = true; + } + if (disableButton) { + const buttonEl = document.querySelector(".button.set-partner"); // select customer selection button using class name + if (buttonEl) { + buttonEl.classList.add("disabled"); // add class disabled to disable the button + buttonEl.style.cursor = "not-allowed"; // add style to the button to disallow the cursor + buttonEl.style.backgroundColor = '#C9CCD2'; // add style to the button to provide background color + } + } else { + return super.onClickPartner(); + } +} + +} + Registries.Component.extend(ProductScreen, pay); + +}); \ No newline at end of file diff --git a/pos_user_access_rights/static/src/js/ticket_screen.js b/pos_user_access_rights/static/src/js/ticket_screen.js new file mode 100644 index 000000000..250a1cde7 --- /dev/null +++ b/pos_user_access_rights/static/src/js/ticket_screen.js @@ -0,0 +1,39 @@ +odoo.define('pos_user_access_rights.ticket_screen', function (require) { +"use strict"; +const Registries = require('point_of_sale.Registries'); +const TicketScreen = require('point_of_sale.TicketScreen'); +const { onMounted } = owl; + + +const order = (TicketScreen) => + class extends TicketScreen { + onMounted() { + let hideButtons = false; + const disableNewOrders = this.env.pos.res_users.hide_new_orders; //access hide new orders field from res users + if (disableNewOrders) { + hideButtons = true; + } + + const newOrderButtonEl = document.querySelector(".buttons button.highlight"); // select new order button using class name + if (hideButtons && newOrderButtonEl) { + newOrderButtonEl.style.display = "none"; // hide the button using display style + } + + + const deleteOrderButtonEls = document.querySelectorAll(".delete-button"); // select delete order button using class name + if (deleteOrderButtonEls.length > 0) { + let hideButtons = false; + if (this.env.pos.res_users.hide_delete_button) { + hideButtons = true; + } + if (hideButtons) { + deleteOrderButtonEls.forEach((deleteOrderButtonEls) => { + deleteOrderButtonEls.style.display = "none"; // hide the button using display style + }); + } + } + } + } + Registries.Component.extend(TicketScreen, order); + +}); \ No newline at end of file diff --git a/pos_user_access_rights/views/res_users_view.xml b/pos_user_access_rights/views/res_users_view.xml new file mode 100644 index 000000000..5e51462aa --- /dev/null +++ b/pos_user_access_rights/views/res_users_view.xml @@ -0,0 +1,29 @@ + + + + + res_users_form + res.users + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file