diff --git a/pos_access_right_hr/README.rst b/pos_access_right_hr/README.rst new file mode 100644 index 000000000..b252a12b6 --- /dev/null +++ b/pos_access_right_hr/README.rst @@ -0,0 +1,46 @@ +.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +POS Access Right +================ +To enable or disable POS features depending on the access rights granted to the cashiers + +Configuration +============= +No configuration required + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.odoo.com/documentation/user/16.0/legal/licenses/licenses.html) + +Credits +------- +Developer: Viswanth K v16 @ cybrosys, 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_access_right_hr/__init__.py b/pos_access_right_hr/__init__.py new file mode 100644 index 000000000..79ffb9885 --- /dev/null +++ b/pos_access_right_hr/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# 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_access_right_hr/__manifest__.py b/pos_access_right_hr/__manifest__.py new file mode 100644 index 000000000..f12d4e0a2 --- /dev/null +++ b/pos_access_right_hr/__manifest__.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# 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 Right', + 'version': '16.0.1.0.0', + "category": 'Point of Sale', + 'summary': 'To Restrict POS features for cashiers', + 'description': 'This app allows you to enable or disable POS features ' + 'depending on the access rights granted to the cashiers', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'depends': ['base', 'hr', 'point_of_sale', 'pos_hr'], + 'website': 'https://www.cybrosys.com/', + 'data': [ + 'views/hr_employee_views.xml', + ], + 'assets': { + 'point_of_sale.assets': [ + 'pos_access_right_hr/static/src/js/models.js', + 'pos_access_right_hr/static/src/js/NumpadWidgetAccessRight.js', + 'pos_access_right_hr/static/src/js/ActionpadWidgetAccessRight.js', + 'pos_access_right_hr/static/src/xml/NumpadWidgetAccessRight.xml', + 'pos_access_right_hr/static/src/xml/ActionpadWidgetAccessRight.xml' + ], + }, + 'images': ['static/description/banner.png'], + 'installable': True, + 'auto_install': False, + 'application': False, + 'license': 'LGPL-3', +} diff --git a/pos_access_right_hr/doc/RELEASE_NOTES.md b/pos_access_right_hr/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..1a13edb06 --- /dev/null +++ b/pos_access_right_hr/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 04.05.2023 +#### Version 16.0.1.0.0 +##### ADD +- Initial commit for POS Access Right \ No newline at end of file diff --git a/pos_access_right_hr/models/__init__.py b/pos_access_right_hr/models/__init__.py new file mode 100644 index 000000000..f5ef4abb0 --- /dev/null +++ b/pos_access_right_hr/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# 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 hr_employee +from .import pos_session diff --git a/pos_access_right_hr/models/hr_employee.py b/pos_access_right_hr/models/hr_employee.py new file mode 100644 index 000000000..816089cb0 --- /dev/null +++ b/pos_access_right_hr/models/hr_employee.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# 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 fields, models + + +class HrEmployee(models.Model): + """ + The inherited class HrEmployee to add new fields to hr.employee + """ + _inherit = 'hr.employee' + + disable_payment = fields.Boolean( + string="POS-Disable Payment", + help="Disable the payment button on the POS") + disable_customer = fields.Boolean( + string="POS-Disable Customer", + help="Disable the customer selection button on the POS") + disable_plus_minus = fields.Boolean( + string="POS-Disable Plus-Minus", + help="Disable the +/- button on the POS") + disable_numpad = fields.Boolean( + string="POS-Disable Numpad", + help="Disable the number pad on the POS") + disable_qty = fields.Boolean( + string="POS-Disable Qty", + help="Disable the Qty button on the POS") + disable_discount = fields.Boolean( + string="POS-Disable Discount", + help="Disable the %Disc button on the POS") + disable_price = fields.Boolean( + string="POS-Disable price", + help="Disable the %Price button on the POS") + disable_remove_button = fields.Boolean( + string="POS-Disable Remove Button", + help="Disable the back button on the POS") diff --git a/pos_access_right_hr/models/pos_session.py b/pos_access_right_hr/models/pos_session.py new file mode 100644 index 000000000..8ff3b430c --- /dev/null +++ b/pos_access_right_hr/models/pos_session.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# 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 + + +class PosSession(models.Model): + """ + The inherited class PosSession to add new fields and models to pos.session + """ + _inherit = 'pos.session' + + def _loader_params_hr_employee(self): + """ + Method for loading hr_employee fields to pos.session + :return: dictionary containing hr_employee access right fields + """ + result = super()._loader_params_hr_employee() + result['search_params']['fields'].extend( + ['disable_payment', 'disable_customer', 'disable_plus_minus', 'disable_numpad', 'disable_qty', 'disable_discount', 'disable_price', + 'disable_remove_button']) + return result diff --git a/pos_access_right_hr/static/description/assets/icons/check.png b/pos_access_right_hr/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/pos_access_right_hr/static/description/assets/icons/check.png differ diff --git a/pos_access_right_hr/static/description/assets/icons/chevron.png b/pos_access_right_hr/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/pos_access_right_hr/static/description/assets/icons/chevron.png differ diff --git a/pos_access_right_hr/static/description/assets/icons/cogs.png b/pos_access_right_hr/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/pos_access_right_hr/static/description/assets/icons/cogs.png differ diff --git a/pos_access_right_hr/static/description/assets/icons/consultation.png b/pos_access_right_hr/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/pos_access_right_hr/static/description/assets/icons/consultation.png differ diff --git a/pos_access_right_hr/static/description/assets/icons/ecom-black.png b/pos_access_right_hr/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/pos_access_right_hr/static/description/assets/icons/ecom-black.png differ diff --git a/pos_access_right_hr/static/description/assets/icons/education-black.png b/pos_access_right_hr/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/pos_access_right_hr/static/description/assets/icons/education-black.png differ diff --git a/pos_access_right_hr/static/description/assets/icons/hotel-black.png b/pos_access_right_hr/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/pos_access_right_hr/static/description/assets/icons/hotel-black.png differ diff --git a/pos_access_right_hr/static/description/assets/icons/license.png b/pos_access_right_hr/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/pos_access_right_hr/static/description/assets/icons/license.png differ diff --git a/pos_access_right_hr/static/description/assets/icons/lifebuoy.png b/pos_access_right_hr/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/pos_access_right_hr/static/description/assets/icons/lifebuoy.png differ diff --git a/pos_access_right_hr/static/description/assets/icons/manufacturing-black.png b/pos_access_right_hr/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/pos_access_right_hr/static/description/assets/icons/manufacturing-black.png differ diff --git a/pos_access_right_hr/static/description/assets/icons/pos-black.png b/pos_access_right_hr/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/pos_access_right_hr/static/description/assets/icons/pos-black.png differ diff --git a/pos_access_right_hr/static/description/assets/icons/puzzle.png b/pos_access_right_hr/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/pos_access_right_hr/static/description/assets/icons/puzzle.png differ diff --git a/pos_access_right_hr/static/description/assets/icons/restaurant-black.png b/pos_access_right_hr/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/pos_access_right_hr/static/description/assets/icons/restaurant-black.png differ diff --git a/pos_access_right_hr/static/description/assets/icons/service-black.png b/pos_access_right_hr/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/pos_access_right_hr/static/description/assets/icons/service-black.png differ diff --git a/pos_access_right_hr/static/description/assets/icons/trading-black.png b/pos_access_right_hr/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/pos_access_right_hr/static/description/assets/icons/trading-black.png differ diff --git a/pos_access_right_hr/static/description/assets/icons/training.png b/pos_access_right_hr/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/pos_access_right_hr/static/description/assets/icons/training.png differ diff --git a/pos_access_right_hr/static/description/assets/icons/update.png b/pos_access_right_hr/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/pos_access_right_hr/static/description/assets/icons/update.png differ diff --git a/pos_access_right_hr/static/description/assets/icons/user.png b/pos_access_right_hr/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/pos_access_right_hr/static/description/assets/icons/user.png differ diff --git a/pos_access_right_hr/static/description/assets/icons/wrench.png b/pos_access_right_hr/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/pos_access_right_hr/static/description/assets/icons/wrench.png differ diff --git a/pos_access_right_hr/static/description/assets/misc/categories.png b/pos_access_right_hr/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/pos_access_right_hr/static/description/assets/misc/categories.png differ diff --git a/pos_access_right_hr/static/description/assets/misc/check-box.png b/pos_access_right_hr/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/pos_access_right_hr/static/description/assets/misc/check-box.png differ diff --git a/pos_access_right_hr/static/description/assets/misc/compass.png b/pos_access_right_hr/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/pos_access_right_hr/static/description/assets/misc/compass.png differ diff --git a/pos_access_right_hr/static/description/assets/misc/corporate.png b/pos_access_right_hr/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/pos_access_right_hr/static/description/assets/misc/corporate.png differ diff --git a/pos_access_right_hr/static/description/assets/misc/customer-support.png b/pos_access_right_hr/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/pos_access_right_hr/static/description/assets/misc/customer-support.png differ diff --git a/pos_access_right_hr/static/description/assets/misc/cybrosys-logo.png b/pos_access_right_hr/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/pos_access_right_hr/static/description/assets/misc/cybrosys-logo.png differ diff --git a/pos_access_right_hr/static/description/assets/misc/features.png b/pos_access_right_hr/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/pos_access_right_hr/static/description/assets/misc/features.png differ diff --git a/pos_access_right_hr/static/description/assets/misc/logo.png b/pos_access_right_hr/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/pos_access_right_hr/static/description/assets/misc/logo.png differ diff --git a/pos_access_right_hr/static/description/assets/misc/pictures.png b/pos_access_right_hr/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/pos_access_right_hr/static/description/assets/misc/pictures.png differ diff --git a/pos_access_right_hr/static/description/assets/misc/pie-chart.png b/pos_access_right_hr/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/pos_access_right_hr/static/description/assets/misc/pie-chart.png differ diff --git a/pos_access_right_hr/static/description/assets/misc/right-arrow.png b/pos_access_right_hr/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/pos_access_right_hr/static/description/assets/misc/right-arrow.png differ diff --git a/pos_access_right_hr/static/description/assets/misc/star.png b/pos_access_right_hr/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/pos_access_right_hr/static/description/assets/misc/star.png differ diff --git a/pos_access_right_hr/static/description/assets/misc/support.png b/pos_access_right_hr/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/pos_access_right_hr/static/description/assets/misc/support.png differ diff --git a/pos_access_right_hr/static/description/assets/misc/whatsapp.png b/pos_access_right_hr/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/pos_access_right_hr/static/description/assets/misc/whatsapp.png differ diff --git a/pos_access_right_hr/static/description/assets/modules/1.png b/pos_access_right_hr/static/description/assets/modules/1.png new file mode 100644 index 000000000..fd1f87699 Binary files /dev/null and b/pos_access_right_hr/static/description/assets/modules/1.png differ diff --git a/pos_access_right_hr/static/description/assets/modules/2.png b/pos_access_right_hr/static/description/assets/modules/2.png new file mode 100644 index 000000000..c56c96bae Binary files /dev/null and b/pos_access_right_hr/static/description/assets/modules/2.png differ diff --git a/pos_access_right_hr/static/description/assets/modules/3.png b/pos_access_right_hr/static/description/assets/modules/3.png new file mode 100644 index 000000000..a77027978 Binary files /dev/null and b/pos_access_right_hr/static/description/assets/modules/3.png differ diff --git a/pos_access_right_hr/static/description/assets/modules/4.png b/pos_access_right_hr/static/description/assets/modules/4.png new file mode 100644 index 000000000..c247ba6ac Binary files /dev/null and b/pos_access_right_hr/static/description/assets/modules/4.png differ diff --git a/pos_access_right_hr/static/description/assets/modules/5.png b/pos_access_right_hr/static/description/assets/modules/5.png new file mode 100644 index 000000000..ea9ab12fb Binary files /dev/null and b/pos_access_right_hr/static/description/assets/modules/5.png differ diff --git a/pos_access_right_hr/static/description/assets/modules/6.png b/pos_access_right_hr/static/description/assets/modules/6.png new file mode 100644 index 000000000..f52b99646 Binary files /dev/null and b/pos_access_right_hr/static/description/assets/modules/6.png differ diff --git a/pos_access_right_hr/static/description/assets/screenshots/0.png b/pos_access_right_hr/static/description/assets/screenshots/0.png new file mode 100644 index 000000000..9d16eeaf8 Binary files /dev/null and b/pos_access_right_hr/static/description/assets/screenshots/0.png differ diff --git a/pos_access_right_hr/static/description/assets/screenshots/1.png b/pos_access_right_hr/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..746b1fa75 Binary files /dev/null and b/pos_access_right_hr/static/description/assets/screenshots/1.png differ diff --git a/pos_access_right_hr/static/description/assets/screenshots/2.png b/pos_access_right_hr/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..8777c3dfb Binary files /dev/null and b/pos_access_right_hr/static/description/assets/screenshots/2.png differ diff --git a/pos_access_right_hr/static/description/assets/screenshots/3.png b/pos_access_right_hr/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..b8c07721d Binary files /dev/null and b/pos_access_right_hr/static/description/assets/screenshots/3.png differ diff --git a/pos_access_right_hr/static/description/assets/screenshots/4.png b/pos_access_right_hr/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..83a660af2 Binary files /dev/null and b/pos_access_right_hr/static/description/assets/screenshots/4.png differ diff --git a/pos_access_right_hr/static/description/assets/screenshots/5.png b/pos_access_right_hr/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..0b5c83785 Binary files /dev/null and b/pos_access_right_hr/static/description/assets/screenshots/5.png differ diff --git a/pos_access_right_hr/static/description/assets/screenshots/6.png b/pos_access_right_hr/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..52a5014a4 Binary files /dev/null and b/pos_access_right_hr/static/description/assets/screenshots/6.png differ diff --git a/pos_access_right_hr/static/description/assets/screenshots/7.png b/pos_access_right_hr/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..e15af16ce Binary files /dev/null and b/pos_access_right_hr/static/description/assets/screenshots/7.png differ diff --git a/pos_access_right_hr/static/description/assets/screenshots/8.png b/pos_access_right_hr/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..7a4028833 Binary files /dev/null and b/pos_access_right_hr/static/description/assets/screenshots/8.png differ diff --git a/pos_access_right_hr/static/description/assets/screenshots/hero.gif b/pos_access_right_hr/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..baff6e7a0 Binary files /dev/null and b/pos_access_right_hr/static/description/assets/screenshots/hero.gif differ diff --git a/pos_access_right_hr/static/description/banner.png b/pos_access_right_hr/static/description/banner.png new file mode 100644 index 000000000..a586ef1bb Binary files /dev/null and b/pos_access_right_hr/static/description/banner.png differ diff --git a/pos_access_right_hr/static/description/icon.png b/pos_access_right_hr/static/description/icon.png new file mode 100644 index 000000000..610292db9 Binary files /dev/null and b/pos_access_right_hr/static/description/icon.png differ diff --git a/pos_access_right_hr/static/description/index.html b/pos_access_right_hr/static/description/index.html new file mode 100644 index 000000000..a434e7877 --- /dev/null +++ b/pos_access_right_hr/static/description/index.html @@ -0,0 +1,550 @@ +
+ +
+ +
+
+ Community +
+
+
+ + + +

POS Access Right

+

This app allows you to enable or disable POS features depending on the access rights granted to the cashiers

+ + + +
+ + +
+
+ +
+

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ This module allows admin to restrict perticular features of POS from cashiers such as payment,numpad, qty buttons etc. +
+
+ + + +
+
+ +
+

Features +

+
+
+
+
+ + Disable or Enable POS features to the specific employee +
+
+ + Can manage access rights for multiple cashiers +
+
+ + Only administrator can control the POS features access rights for employee +
+
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+ +
+

Need to enable 'Multi Employees per Session' and select employees that you want to restrict access to the POS

+ +
+ +
+

Allow the Payment button on the POS screen to be disabled

+ +
+ +
+

The Payment button is disabled on the POS screen

+ +
+ +
+

Allow the Customer button on the POS screen to be disabled

+ +
+
+

The Customer button is disabled on the POS screen

+ +
+ +
+

Allow the Plus-Minus and Numpad button on the POS screen to be disabled

+ +
+
+

The Plus-Minus and Numpad button is disabled on the POS screen

+ +
+
+

Allow the Discount,Qty,Price, and Remove buttons on the POS screen to be disabled

+ +
+
+

The Discount,Qty,Price, and Remove buttons is disabled on the POS screen

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

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_access_right_hr/static/src/js/ActionpadWidgetAccessRight.js b/pos_access_right_hr/static/src/js/ActionpadWidgetAccessRight.js new file mode 100644 index 000000000..fd3cfc3fd --- /dev/null +++ b/pos_access_right_hr/static/src/js/ActionpadWidgetAccessRight.js @@ -0,0 +1,39 @@ +odoo.define('pos_access_right_hr.ActionPad_extension', function(require) { + 'use strict'; + const ActionpadWidget = require('point_of_sale.ActionpadWidget'); + const Registries = require('point_of_sale.Registries'); + const ActionpadWidgetAccessRight= ActionpadWidget => class extends ActionpadWidget { + //To enable or disable buttons in the ActionpadWidget + + /** + * Disable the customer selection button on the POS + */ + get disable_customer() { + if (this.env.pos.config.module_pos_hr) { + const cashierId = this.env.pos.get_cashier().id; + const sessionAccess = this.env.pos.session_access.find(access => access.id === cashierId); + if (sessionAccess && sessionAccess.disable_customer) { + self.$('#customer_disable').css({ "border": "1px solid #C9CCD2", "background-color": "#E0E2E6","color":"#666666" }); + } + return sessionAccess ? sessionAccess.disable_customer : false; + } + else {return false;} + } + /** + * Disable the customer selection button on the POS + */ + get disable_payment() { + if (this.env.pos.config.module_pos_hr) { + const cashierId = this.env.pos.get_cashier().id; + const sessionAccess = this.env.pos.session_access.find(access => access.id === cashierId); + if (sessionAccess && sessionAccess.disable_payment) { + self.$("#payment_disable").css({ "border": "1px solid #C9CCD2", "background-color": "#E0E2E6","color":"#666666" }); + } + return sessionAccess ? sessionAccess.disable_payment : false; + } + else {return false;} + } + }; + Registries.Component.extend(ActionpadWidget, ActionpadWidgetAccessRight); + return ActionpadWidget; + }); diff --git a/pos_access_right_hr/static/src/js/NumpadWidgetAccessRight.js b/pos_access_right_hr/static/src/js/NumpadWidgetAccessRight.js new file mode 100644 index 000000000..b0698bac6 --- /dev/null +++ b/pos_access_right_hr/static/src/js/NumpadWidgetAccessRight.js @@ -0,0 +1,82 @@ +odoo.define('pos_access_right_hr.CustomOrdrScreen', function(require) { + 'use strict'; + const NumpadWidget = require('point_of_sale.NumpadWidget'); + const Registries = require('point_of_sale.Registries'); + const NumpadWidgetAccessRight= NumpadWidget => class extends NumpadWidget { + //To enable or disable buttons in the NumpadWidget + + /** + * Disable the Qty button on the POS + */ + get disable_quantity() { + if (this.env.pos.config.module_pos_hr) { + const cashierId = this.env.pos.get_cashier().id; + const sessionAccess = this.env.pos.session_access.find(access => access.id === cashierId); + return sessionAccess ? sessionAccess.disable_qty : false; + } + else { return false;} + } + + /** + * Disable the Price button on the POS + */ + get disable_price() { + if (this.env.pos.config.module_pos_hr) { + const cashierId = this.env.pos.get_cashier().id; + const sessionAccess = this.env.pos.session_access.find(access => access.id === cashierId); + return sessionAccess ? sessionAccess.disable_price : false; + } + else { return false;} + } + + /** + * Disable the Discount button on the POS + */ + get disable_discount() { + if (this.env.pos.config.module_pos_hr) { + const cashierId = this.env.pos.get_cashier().id; + const sessionAccess = this.env.pos.session_access.find(access => access.id === cashierId); + return sessionAccess ? sessionAccess.disable_discount : false; + } + else { return false;} + } + + /** + * Disable the +/- button on the POS + */ + get plusminus() { + if (this.env.pos.config.module_pos_hr) { + const cashierId = this.env.pos.get_cashier().id; + const sessionAccess = this.env.pos.session_access.find(access => access.id === cashierId); + return sessionAccess ? sessionAccess.disable_plus_minus : false; + } + else { return false;} + } + + /** + * Disable the number pad on the POS + */ + get numpad() { + if (this.env.pos.config.module_pos_hr) { + const cashierId = this.env.pos.get_cashier().id; + const sessionAccess = this.env.pos.session_access.find(access => access.id === cashierId); + return sessionAccess ? sessionAccess.disable_numpad : false; + } + else { return false;} + } + + /** + * Disable the back button on the POS + */ + get remove_button() { + if (this.env.pos.config.module_pos_hr) { + const cashierId = this.env.pos.get_cashier().id; + const sessionAccess = this.env.pos.session_access.find(access => access.id === cashierId); + return sessionAccess ? sessionAccess.disable_remove_button : false; + } + else { return false;} + } + }; + Registries.Component.extend(NumpadWidget, NumpadWidgetAccessRight); + return NumpadWidget; + }); diff --git a/pos_access_right_hr/static/src/js/models.js b/pos_access_right_hr/static/src/js/models.js new file mode 100644 index 000000000..6fcdee9e3 --- /dev/null +++ b/pos_access_right_hr/static/src/js/models.js @@ -0,0 +1,13 @@ +odoo.define('pos_access_right_hr.Access_Right', function(require) { + 'use strict'; + var { PosGlobalState, Order} = require('point_of_sale.models'); + const Registries = require('point_of_sale.Registries'); + const PosSessionOrdersPosGlobalStateExtend = (PosGlobalState) => class PosSessionOrdersPosGlobalStateExtend extends PosGlobalState { + //To load hr.employee fields to pos session + async _processData(loadedData) { + await super._processData(...arguments); + this.session_access = loadedData['hr.employee']; + } + } + Registries.Model.extend(PosGlobalState, PosSessionOrdersPosGlobalStateExtend); +}); diff --git a/pos_access_right_hr/static/src/xml/ActionpadWidgetAccessRight.xml b/pos_access_right_hr/static/src/xml/ActionpadWidgetAccessRight.xml new file mode 100644 index 000000000..bfe8f3650 --- /dev/null +++ b/pos_access_right_hr/static/src/xml/ActionpadWidgetAccessRight.xml @@ -0,0 +1,37 @@ + + + + + +
+ + + +
+
+
+
diff --git a/pos_access_right_hr/static/src/xml/NumpadWidgetAccessRight.xml b/pos_access_right_hr/static/src/xml/NumpadWidgetAccessRight.xml new file mode 100644 index 000000000..ff8fe3770 --- /dev/null +++ b/pos_access_right_hr/static/src/xml/NumpadWidgetAccessRight.xml @@ -0,0 +1,41 @@ + + + + + +
+ + + + + + + + + + + + + + + + +
+
+
+
diff --git a/pos_access_right_hr/views/hr_employee_views.xml b/pos_access_right_hr/views/hr_employee_views.xml new file mode 100644 index 000000000..cc23622b5 --- /dev/null +++ b/pos_access_right_hr/views/hr_employee_views.xml @@ -0,0 +1,30 @@ + + + + + hr.employee.view.form.inherit.pos.access.right.hr + hr.employee + form + + + + + + + + + + + + + + + + + + + + + + +