diff --git a/pos_custom_message/README.rst b/pos_custom_message/README.rst new file mode 100644 index 000000000..af46a77f2 --- /dev/null +++ b/pos_custom_message/README.rst @@ -0,0 +1,46 @@ +.. 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 + +POS Custom Message +================== +This module helps you to show custom popup messages at pos screen. + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Gnu Affero General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developer : (V16) Muhsina V @ Cybrosys + +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_custom_message/__init__.py b/pos_custom_message/__init__.py new file mode 100644 index 000000000..d61258da4 --- /dev/null +++ b/pos_custom_message/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Muhsina V () +# +# 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_custom_message/__manifest__.py b/pos_custom_message/__manifest__.py new file mode 100644 index 000000000..99bb1bbbc --- /dev/null +++ b/pos_custom_message/__manifest__.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Muhsina V () +# +# 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': 'POS Custom Message', + 'version': '16.0.1.0.0', + 'category': 'Point of Sale', + 'summary': 'Custom popup messages in pos screen', + 'description': "This Module allows you to create custom messages that " + "will be displayed at a specific time on the Point of Sale " + "(POS) screen. These messages can be used to remind users " + "of important tasks, warn them about potential problems, " + "or provide them with other information.", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'point_of_sale'], + 'data': [ + 'security/ir.model.access.csv', + 'views/pos_custom_message_views.xml', + 'views/res_config_settings_views.xml', + ], + 'assets': { + 'point_of_sale.assets': [ + 'pos_custom_message/static/src/js/*.js', + 'pos_custom_message/static/src/xml/pos_popup_templates.xml', + ], + }, + 'images': ['static/description/banner.jpg'], + 'licence': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/pos_custom_message/doc/RELEASE_NOTES.md b/pos_custom_message/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..8018a685a --- /dev/null +++ b/pos_custom_message/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 31.07.2023 +#### Version 16.0.1.0.0 +##### ADD +- Initial Commit for POS Custom Message \ No newline at end of file diff --git a/pos_custom_message/models/__init__.py b/pos_custom_message/models/__init__.py new file mode 100644 index 000000000..7904c2a22 --- /dev/null +++ b/pos_custom_message/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Muhsina V () +# +# 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_custom_message +from . import pos_session +from . import res_config_settings diff --git a/pos_custom_message/models/pos_custom_message.py b/pos_custom_message/models/pos_custom_message.py new file mode 100644 index 000000000..0183bfe2b --- /dev/null +++ b/pos_custom_message/models/pos_custom_message.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Muhsina V () +# +# 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 PosCustomMessage(models.Model): + """Model to manage custom popup messages for the Point of Sale system.""" + _name = 'pos.custom.message' + _description = "Custom Popup Messages in Pos Screen" + _rec_name = 'title' + + message_type = fields.Selection([('alert', 'Alert'), ('warn', 'Warning'), + ('info', 'Information')], default='alert', + string="Message Type", + help="Choose the message type") + title = fields.Char(string="Title", help="Title of the message") + message_text = fields.Char(string="Message Text", + help="Content of the message") + execution_time = fields.Float(string="Execution Time", + help="Choose the time in 24-hour format at " + "which the popup should be shown.") + pos_config_ids = fields.Many2many('pos.config', string="Point of sale", + help="Choose the point of sale") diff --git a/pos_custom_message/models/pos_session.py b/pos_custom_message/models/pos_session.py new file mode 100644 index 000000000..4de7c1851 --- /dev/null +++ b/pos_custom_message/models/pos_session.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Muhsina V () +# +# 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 ast import literal_eval +from odoo import models + + +class PosSession(models.Model): + """Inherited model for extending the Point of Sale sessions.""" + _inherit = 'pos.session' + + def _pos_ui_models_to_load(self): + """Add 'pos.custom.message' to the models to be loaded in the Point of + Sale UI.""" + res = super()._pos_ui_models_to_load() + res.append('pos.custom.message') + return res + + def _loader_params_pos_custom_message(self): + """Retrieve the loader parameters for 'pos.custom.message'.""" + ids = (self.env['ir.config_parameter'].sudo().get_param( + 'pos_custom_message.message_ids')) + if ids: + message_ids = self.browse(literal_eval(ids)) + domain = [('id', 'in', message_ids.ids)] + else: + domain = "" + return { + 'search_params': { + 'domain': domain, + 'fields': [ + 'message_type', 'title', 'message_text', 'execution_time', + 'pos_config_ids' + ], + } + } + + def _get_pos_ui_pos_custom_message(self, params): + """Get 'pos.custom.message' records based on the provided search + parameters.""" + return self.env['pos.custom.message'].search_read( + **params['search_params']) diff --git a/pos_custom_message/models/res_config_settings.py b/pos_custom_message/models/res_config_settings.py new file mode 100644 index 000000000..ef5c898b5 --- /dev/null +++ b/pos_custom_message/models/res_config_settings.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Muhsina V () +# +# 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 ast import literal_eval +from odoo import api, fields, models + + +class ResConfigSettings(models.TransientModel): + """Inherited the res.config.settings model to add a field to select the + messages""" + _inherit = 'res.config.settings' + + message_ids = fields.Many2many('pos.custom.message', + string="Messages to popup", + domain="[('pos_config_ids', '=', pos_config_id)]", + help="Choose the messages to show as popup") + + def set_values(self): + """ + Override the 'set_values' method to save the selected messages as + configuration parameters. + """ + res = super(ResConfigSettings, self).set_values() + self.env['ir.config_parameter'].sudo().set_param( + 'pos_custom_message.message_ids', self.message_ids.ids) + return res + + @api.model + def get_values(self): + """ + Override the 'get_values' method to retrieve the selected messages from + configuration parameters. + """ + res = super(ResConfigSettings, self).get_values() + selected_message_ids = self.env['ir.config_parameter'].sudo( + ).get_param('pos_custom_message.message_ids') + res.update(message_ids=[ + (6, 0, literal_eval(selected_message_ids))] + if selected_message_ids else False, ) + return res diff --git a/pos_custom_message/security/ir.model.access.csv b/pos_custom_message/security/ir.model.access.csv new file mode 100644 index 000000000..3ded42ae7 --- /dev/null +++ b/pos_custom_message/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink +access_pos_custom_message,access.pos.custom.message,model_pos_custom_message,base.group_user,1,1,1,1 diff --git a/pos_custom_message/static/description/assets/icons/check.png b/pos_custom_message/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/pos_custom_message/static/description/assets/icons/check.png differ diff --git a/pos_custom_message/static/description/assets/icons/chevron.png b/pos_custom_message/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/pos_custom_message/static/description/assets/icons/chevron.png differ diff --git a/pos_custom_message/static/description/assets/icons/cogs.png b/pos_custom_message/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/pos_custom_message/static/description/assets/icons/cogs.png differ diff --git a/pos_custom_message/static/description/assets/icons/consultation.png b/pos_custom_message/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/pos_custom_message/static/description/assets/icons/consultation.png differ diff --git a/pos_custom_message/static/description/assets/icons/ecom-black.png b/pos_custom_message/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/pos_custom_message/static/description/assets/icons/ecom-black.png differ diff --git a/pos_custom_message/static/description/assets/icons/education-black.png b/pos_custom_message/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/pos_custom_message/static/description/assets/icons/education-black.png differ diff --git a/pos_custom_message/static/description/assets/icons/hotel-black.png b/pos_custom_message/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/pos_custom_message/static/description/assets/icons/hotel-black.png differ diff --git a/pos_custom_message/static/description/assets/icons/license.png b/pos_custom_message/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/pos_custom_message/static/description/assets/icons/license.png differ diff --git a/pos_custom_message/static/description/assets/icons/lifebuoy.png b/pos_custom_message/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/pos_custom_message/static/description/assets/icons/lifebuoy.png differ diff --git a/pos_custom_message/static/description/assets/icons/manufacturing-black.png b/pos_custom_message/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/pos_custom_message/static/description/assets/icons/manufacturing-black.png differ diff --git a/pos_custom_message/static/description/assets/icons/pos-black.png b/pos_custom_message/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/pos_custom_message/static/description/assets/icons/pos-black.png differ diff --git a/pos_custom_message/static/description/assets/icons/puzzle.png b/pos_custom_message/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/pos_custom_message/static/description/assets/icons/puzzle.png differ diff --git a/pos_custom_message/static/description/assets/icons/restaurant-black.png b/pos_custom_message/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/pos_custom_message/static/description/assets/icons/restaurant-black.png differ diff --git a/pos_custom_message/static/description/assets/icons/service-black.png b/pos_custom_message/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/pos_custom_message/static/description/assets/icons/service-black.png differ diff --git a/pos_custom_message/static/description/assets/icons/trading-black.png b/pos_custom_message/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/pos_custom_message/static/description/assets/icons/trading-black.png differ diff --git a/pos_custom_message/static/description/assets/icons/training.png b/pos_custom_message/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/pos_custom_message/static/description/assets/icons/training.png differ diff --git a/pos_custom_message/static/description/assets/icons/update.png b/pos_custom_message/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/pos_custom_message/static/description/assets/icons/update.png differ diff --git a/pos_custom_message/static/description/assets/icons/user.png b/pos_custom_message/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/pos_custom_message/static/description/assets/icons/user.png differ diff --git a/pos_custom_message/static/description/assets/icons/wrench.png b/pos_custom_message/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/pos_custom_message/static/description/assets/icons/wrench.png differ diff --git a/pos_custom_message/static/description/assets/misc/categories.png b/pos_custom_message/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/pos_custom_message/static/description/assets/misc/categories.png differ diff --git a/pos_custom_message/static/description/assets/misc/check-box.png b/pos_custom_message/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/pos_custom_message/static/description/assets/misc/check-box.png differ diff --git a/pos_custom_message/static/description/assets/misc/compass.png b/pos_custom_message/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/pos_custom_message/static/description/assets/misc/compass.png differ diff --git a/pos_custom_message/static/description/assets/misc/corporate.png b/pos_custom_message/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/pos_custom_message/static/description/assets/misc/corporate.png differ diff --git a/pos_custom_message/static/description/assets/misc/customer-support.png b/pos_custom_message/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/pos_custom_message/static/description/assets/misc/customer-support.png differ diff --git a/pos_custom_message/static/description/assets/misc/cybrosys-logo.png b/pos_custom_message/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/pos_custom_message/static/description/assets/misc/cybrosys-logo.png differ diff --git a/pos_custom_message/static/description/assets/misc/features.png b/pos_custom_message/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/pos_custom_message/static/description/assets/misc/features.png differ diff --git a/pos_custom_message/static/description/assets/misc/logo.png b/pos_custom_message/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/pos_custom_message/static/description/assets/misc/logo.png differ diff --git a/pos_custom_message/static/description/assets/misc/pictures.png b/pos_custom_message/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/pos_custom_message/static/description/assets/misc/pictures.png differ diff --git a/pos_custom_message/static/description/assets/misc/pie-chart.png b/pos_custom_message/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/pos_custom_message/static/description/assets/misc/pie-chart.png differ diff --git a/pos_custom_message/static/description/assets/misc/right-arrow.png b/pos_custom_message/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/pos_custom_message/static/description/assets/misc/right-arrow.png differ diff --git a/pos_custom_message/static/description/assets/misc/star.png b/pos_custom_message/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/pos_custom_message/static/description/assets/misc/star.png differ diff --git a/pos_custom_message/static/description/assets/misc/support.png b/pos_custom_message/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/pos_custom_message/static/description/assets/misc/support.png differ diff --git a/pos_custom_message/static/description/assets/misc/whatsapp.png b/pos_custom_message/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/pos_custom_message/static/description/assets/misc/whatsapp.png differ diff --git a/pos_custom_message/static/description/assets/modules/1.png b/pos_custom_message/static/description/assets/modules/1.png new file mode 100644 index 000000000..489f44e86 Binary files /dev/null and b/pos_custom_message/static/description/assets/modules/1.png differ diff --git a/pos_custom_message/static/description/assets/modules/2.png b/pos_custom_message/static/description/assets/modules/2.png new file mode 100644 index 000000000..273effef7 Binary files /dev/null and b/pos_custom_message/static/description/assets/modules/2.png differ diff --git a/pos_custom_message/static/description/assets/modules/3.png b/pos_custom_message/static/description/assets/modules/3.png new file mode 100644 index 000000000..55fb7ba18 Binary files /dev/null and b/pos_custom_message/static/description/assets/modules/3.png differ diff --git a/pos_custom_message/static/description/assets/modules/4.png b/pos_custom_message/static/description/assets/modules/4.png new file mode 100644 index 000000000..c1f30354a Binary files /dev/null and b/pos_custom_message/static/description/assets/modules/4.png differ diff --git a/pos_custom_message/static/description/assets/modules/5.gif b/pos_custom_message/static/description/assets/modules/5.gif new file mode 100644 index 000000000..8f40aab85 Binary files /dev/null and b/pos_custom_message/static/description/assets/modules/5.gif differ diff --git a/pos_custom_message/static/description/assets/modules/6.png b/pos_custom_message/static/description/assets/modules/6.png new file mode 100644 index 000000000..31ed46762 Binary files /dev/null and b/pos_custom_message/static/description/assets/modules/6.png differ diff --git a/pos_custom_message/static/description/assets/modules/dynamic_product_fields.png b/pos_custom_message/static/description/assets/modules/dynamic_product_fields.png new file mode 100644 index 000000000..55fb7ba18 Binary files /dev/null and b/pos_custom_message/static/description/assets/modules/dynamic_product_fields.png differ diff --git a/pos_custom_message/static/description/assets/modules/dynamic_sale_order_fields.png b/pos_custom_message/static/description/assets/modules/dynamic_sale_order_fields.png new file mode 100644 index 000000000..febd12d15 Binary files /dev/null and b/pos_custom_message/static/description/assets/modules/dynamic_sale_order_fields.png differ diff --git a/pos_custom_message/static/description/assets/modules/picking_order_line_view.png b/pos_custom_message/static/description/assets/modules/picking_order_line_view.png new file mode 100644 index 000000000..b8ea6b411 Binary files /dev/null and b/pos_custom_message/static/description/assets/modules/picking_order_line_view.png differ diff --git a/pos_custom_message/static/description/assets/modules/sale_discount_total.png b/pos_custom_message/static/description/assets/modules/sale_discount_total.png new file mode 100644 index 000000000..3add135c3 Binary files /dev/null and b/pos_custom_message/static/description/assets/modules/sale_discount_total.png differ diff --git a/pos_custom_message/static/description/assets/modules/sale_order_line_views.png b/pos_custom_message/static/description/assets/modules/sale_order_line_views.png new file mode 100644 index 000000000..624ef69b7 Binary files /dev/null and b/pos_custom_message/static/description/assets/modules/sale_order_line_views.png differ diff --git a/pos_custom_message/static/description/assets/modules/sale_purchase_previous_product_cost.png b/pos_custom_message/static/description/assets/modules/sale_purchase_previous_product_cost.png new file mode 100644 index 000000000..61bb0ced0 Binary files /dev/null and b/pos_custom_message/static/description/assets/modules/sale_purchase_previous_product_cost.png differ diff --git a/pos_custom_message/static/description/assets/screenshots/1.png b/pos_custom_message/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..c806d3b59 Binary files /dev/null and b/pos_custom_message/static/description/assets/screenshots/1.png differ diff --git a/pos_custom_message/static/description/assets/screenshots/2.png b/pos_custom_message/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..5aeb335f8 Binary files /dev/null and b/pos_custom_message/static/description/assets/screenshots/2.png differ diff --git a/pos_custom_message/static/description/assets/screenshots/3.png b/pos_custom_message/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..9b85d245d Binary files /dev/null and b/pos_custom_message/static/description/assets/screenshots/3.png differ diff --git a/pos_custom_message/static/description/assets/screenshots/4.png b/pos_custom_message/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..c7bf82492 Binary files /dev/null and b/pos_custom_message/static/description/assets/screenshots/4.png differ diff --git a/pos_custom_message/static/description/assets/screenshots/5.png b/pos_custom_message/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..ad79543a0 Binary files /dev/null and b/pos_custom_message/static/description/assets/screenshots/5.png differ diff --git a/pos_custom_message/static/description/assets/screenshots/6.png b/pos_custom_message/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..3fa25118e Binary files /dev/null and b/pos_custom_message/static/description/assets/screenshots/6.png differ diff --git a/pos_custom_message/static/description/assets/screenshots/hero.gif b/pos_custom_message/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..6efc0b7b7 Binary files /dev/null and b/pos_custom_message/static/description/assets/screenshots/hero.gif differ diff --git a/pos_custom_message/static/description/banner.jpg b/pos_custom_message/static/description/banner.jpg new file mode 100644 index 000000000..dfc0d7b62 Binary files /dev/null and b/pos_custom_message/static/description/banner.jpg differ diff --git a/pos_custom_message/static/description/icon.png b/pos_custom_message/static/description/icon.png new file mode 100644 index 000000000..9a53a63bd Binary files /dev/null and b/pos_custom_message/static/description/icon.png differ diff --git a/pos_custom_message/static/description/index.html b/pos_custom_message/static/description/index.html new file mode 100644 index 000000000..654e16875 --- /dev/null +++ b/pos_custom_message/static/description/index.html @@ -0,0 +1,548 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+
+ +
+
+
+ +

+ POS Custom Message +

+

Custom Popup Messages in POS Screen +

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

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ This Module helps to display custom messages at specific times in POS + system. This allows users to create three types of custom messages, + namely Alert, Warning, and Information. Users can specify the message + title, text, and the time at which they want the message to be displayed + in the POS screen. Once the custom messages have been created , + they can be selected to be displayed in the POS system. + At the specified time, the custom message will be displayed as a pop-up in + the POS system, providing the user with important information or alerts. +
+
+ + + +
+
+ +
+

Features +

+
+
+
+
+ + Three Type of Custom Messages like Alert, Warning and Information. + +
+
+ + User Can Set Specific Execution time for Each Message. +
+
+ + Select Custom Messages to Show In POS. +
+
+ + User Can See Popup Custom Messages at specific time in POS. +
+
+
+
+ + Available in Odoo 16.0 + Community and Enterprise. +
+
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+
+

Configure Custom Messages. +

+

Under POS Configuration User Can Configure POS Custom Messages.

+ +
+
+

Three Types Of Messages +

+

User Can Create Three Types of Messages like Alert, Warning And Information, + Also Can set Title, Message Content as well as Execution Time.

+ +
+
+

Select Custom Messages from POS Configuration. +

+

User Can Select Messages in the POS Configuration to Show in POS Screen .

+ +
+
+

Alert Message Popup. +

+

User Can See The Custom Message Popup At The Execution Time Configured In the Backend.

+ +
+
+

Warning Message Popup. +

+

User Can See The Custom Message Popup At The Execution Time Configured In the Backend.

+ +
+
+

Information Message Popup. +

+

User Can See The Custom Message Popup At The Execution Time Configured In the Backend.

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

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_custom_message/static/src/js/AlertPopup.js b/pos_custom_message/static/src/js/AlertPopup.js new file mode 100644 index 000000000..696f63aaf --- /dev/null +++ b/pos_custom_message/static/src/js/AlertPopup.js @@ -0,0 +1,18 @@ +/** @odoo-module */ +import AbstractAwaitablePopup from 'point_of_sale.AbstractAwaitablePopup'; +import Registries from 'point_of_sale.Registries'; +import { _lt } from "@web/core/l10n/translation"; +/** + * CustomMessageAlertPopup component for displaying custom messages as an alert popup. + * Inherits from AbstractAwaitablePopup. + */ +class CustomMessageAlertPopup extends AbstractAwaitablePopup {} +CustomMessageAlertPopup.template = 'CustomMessageAlertPopup'; +CustomMessageAlertPopup.defaultProps = { + confirmText: _lt('Ok'), + title: '', + body: '', +}; +// Add the CustomMessageAlertPopup component to the Point of Sale registries. +Registries.Component.add(CustomMessageAlertPopup); +return CustomMessageAlertPopup \ No newline at end of file diff --git a/pos_custom_message/static/src/js/InfoPopup.js b/pos_custom_message/static/src/js/InfoPopup.js new file mode 100644 index 000000000..68b1e4f85 --- /dev/null +++ b/pos_custom_message/static/src/js/InfoPopup.js @@ -0,0 +1,21 @@ +/** @odoo-module */ +import AbstractAwaitablePopup from 'point_of_sale.AbstractAwaitablePopup'; +import Registries from 'point_of_sale.Registries'; +import { + _lt +} from "@web/core/l10n/translation"; + +/** + * CustomMessageInfoPopup component for displaying custom messages as an informational popup. + * Inherits from AbstractAwaitablePopup. + */ +class CustomMessageInfoPopup extends AbstractAwaitablePopup {} +CustomMessageInfoPopup.template = 'CustomMessageInfoPopup'; +CustomMessageInfoPopup.defaultProps = { + confirmText: _lt('Ok'), + title: '', + body: '', +}; +// Add the CustomMessageInfoPopup component to the Point of Sale registries. +Registries.Component.add(CustomMessageInfoPopup); +return CustomMessageInfoPopup; \ No newline at end of file diff --git a/pos_custom_message/static/src/js/PosSession.js b/pos_custom_message/static/src/js/PosSession.js new file mode 100644 index 000000000..137864d88 --- /dev/null +++ b/pos_custom_message/static/src/js/PosSession.js @@ -0,0 +1,17 @@ +/** @odoo-module */ +import { + PosGlobalState +} from 'point_of_sale.models'; +import Registries from 'point_of_sale.Registries'; +/** + * NewPosGlobalState extends the PosGlobalState class to add custom message processing functionality. + * Inherits from PosGlobalState. + */ +const NewPosGlobalState = (PosGlobalState) => class NewPosGlobalState extends PosGlobalState { + async _processData(loadedData) { + await super._processData(...arguments); + this.pos_custom_message = loadedData['pos.custom.message']; + } +} +// Extend the PosGlobalState model with the NewPosGlobalState functionality. +Registries.Model.extend(PosGlobalState, NewPosGlobalState); \ No newline at end of file diff --git a/pos_custom_message/static/src/js/WarningPopup.js b/pos_custom_message/static/src/js/WarningPopup.js new file mode 100644 index 000000000..059b62331 --- /dev/null +++ b/pos_custom_message/static/src/js/WarningPopup.js @@ -0,0 +1,20 @@ +/** @odoo-module */ +import AbstractAwaitablePopup from 'point_of_sale.AbstractAwaitablePopup'; +import Registries from 'point_of_sale.Registries'; +import { + _lt +} from "@web/core/l10n/translation"; +/** + * CustomMessageWarnPopup component for displaying custom messages as a warning popup. + * Inherits from AbstractAwaitablePopup. + */ +class CustomMessageWarnPopup extends AbstractAwaitablePopup {} +CustomMessageWarnPopup.template = 'CustomMessageWarnPopup'; +CustomMessageWarnPopup.defaultProps = { + confirmText: _lt('Ok'), + title: '', + body: '', +}; +// Add the CustomMessageWarnPopup component to the Point of Sale registries. +Registries.Component.add(CustomMessageWarnPopup); +return CustomMessageWarnPopup; \ No newline at end of file diff --git a/pos_custom_message/static/src/js/pos_custom_message_popup.js b/pos_custom_message/static/src/js/pos_custom_message_popup.js new file mode 100644 index 000000000..9c8ef99b1 --- /dev/null +++ b/pos_custom_message/static/src/js/pos_custom_message_popup.js @@ -0,0 +1,51 @@ +/** @odoo-module */ +import ProductScreen from 'point_of_sale.ProductScreen'; +import Registries from 'point_of_sale.Registries'; +/** + * PosCustomMessage extends the ProductScreen class to display custom message popups at specific execution times. + * Inherits from ProductScreen. + */ +const PosCustomMessage = ProductScreen => + class extends ProductScreen { + setup() { + super.setup(); + var self = this; + setInterval(function() { + const messages = self.env.pos.pos_custom_message; + if (messages) { + messages.forEach((msg) => { + const exec_time = msg.execution_time; + const hours = Math.floor(exec_time); + const minutes = Math.round((exec_time % 1) * 60); + const ExecutionTime = `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:00`; + const now = new Date(); + const now_hours = now.getHours(); + const now_minutes = now.getMinutes(); + const now_seconds = now.getSeconds(); + const formattedTimeNow = `${now_hours.toString().padStart(2, '0')}:${now_minutes.toString().padStart(2, '0')}:${now_seconds.toString().padStart(2, '0')}`; + if (ExecutionTime === formattedTimeNow) { + if (msg.message_type == "alert") + //Alert message popup + self.showPopup('CustomMessageAlertPopup', { + title: msg.title, + body: msg.message_text, + }); + if (msg.message_type == "warn") + // Warning message popup + self.showPopup('CustomMessageWarnPopup', { + title: msg.title, + body: msg.message_text, + }); + if (msg.message_type == "info") + // Information message popup + self.showPopup('CustomMessageInfoPopup', { + title: msg.title, + body: msg.message_text, + }); + } + }); + } + }, 1000); + } + } +Registries.Component.extend(ProductScreen, PosCustomMessage); \ No newline at end of file diff --git a/pos_custom_message/static/src/xml/pos_popup_templates.xml b/pos_custom_message/static/src/xml/pos_popup_templates.xml new file mode 100644 index 000000000..fbbbf712d --- /dev/null +++ b/pos_custom_message/static/src/xml/pos_popup_templates.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pos_custom_message/views/pos_custom_message_views.xml b/pos_custom_message/views/pos_custom_message_views.xml new file mode 100644 index 000000000..a613416e8 --- /dev/null +++ b/pos_custom_message/views/pos_custom_message_views.xml @@ -0,0 +1,47 @@ + + + + + pos.custom.message.view.tree + pos.custom.message + + + + + + + + + + + + pos.custom.message.view.form + pos.custom.message + +
+ + + + + + + + + + + + +
+
+
+ + + Pos Custom Message + pos.custom.message + tree,form + + + +
\ No newline at end of file diff --git a/pos_custom_message/views/res_config_settings_views.xml b/pos_custom_message/views/res_config_settings_views.xml new file mode 100644 index 000000000..32bebddbb --- /dev/null +++ b/pos_custom_message/views/res_config_settings_views.xml @@ -0,0 +1,31 @@ + + + + + res.config.settings.view.form.inherit.pos.custom.message + res.config.settings + + + + + +
+
+
+ + Select Custom Messages + +
Select POS Custom Message. +
+ + +
+
+
+
+ + + + \ No newline at end of file