diff --git a/pos_custom_message/README.rst b/pos_custom_message/README.rst new file mode 100644 index 000000000..17f2f1286 --- /dev/null +++ b/pos_custom_message/README.rst @@ -0,0 +1,47 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +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 + (V17) Sabeel B @ 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..4c6715e91 --- /dev/null +++ b/pos_custom_message/__init__.py @@ -0,0 +1,22 @@ + # -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Sabeel B () +# +# 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..fd54ec2f3 --- /dev/null +++ b/pos_custom_message/__manifest__.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Sabeel B () +# +# 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': '17.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': [ + 'pos_custom_message/static/src/js/*.js', + 'pos_custom_message/static/src/js/Popup/AlertPopup.js', + 'pos_custom_message/static/src/js/Popup/WarningPopup.js', + 'pos_custom_message/static/src/js/Popup/InfoPopup.js', + 'pos_custom_message/static/src/js/Popup/pos_popup_templates.xml', + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': '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..34e456339 --- /dev/null +++ b/pos_custom_message/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 07.02.2024 +#### Version 17.0.1.0.0 +##### ADD +- Initial Commit for POS Custom Message diff --git a/pos_custom_message/models/__init__.py b/pos_custom_message/models/__init__.py new file mode 100644 index 000000000..f312e2987 --- /dev/null +++ b/pos_custom_message/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Sabeel B () +# +# 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..3d3d9f36f --- /dev/null +++ b/pos_custom_message/models/pos_custom_message.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Sabeel B () +# +# 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..207ccc632 --- /dev/null +++ b/pos_custom_message/models/pos_session.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Sabeel B () +# +# 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..7209c1326 --- /dev/null +++ b/pos_custom_message/models/res_config_settings.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Sabeel B () +# +# 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/capture (1).png b/pos_custom_message/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/pos_custom_message/static/description/assets/icons/capture (1).png differ 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/img.png b/pos_custom_message/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/pos_custom_message/static/description/assets/icons/img.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/photo-capture.png b/pos_custom_message/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/pos_custom_message/static/description/assets/icons/photo-capture.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/Cybrosys R.png b/pos_custom_message/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/pos_custom_message/static/description/assets/misc/Cybrosys R.png differ diff --git a/pos_custom_message/static/description/assets/misc/email.svg b/pos_custom_message/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/pos_custom_message/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pos_custom_message/static/description/assets/misc/phone.svg b/pos_custom_message/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/pos_custom_message/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/pos_custom_message/static/description/assets/misc/star (1) 2.svg b/pos_custom_message/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/pos_custom_message/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/pos_custom_message/static/description/assets/misc/support (1) 1.svg b/pos_custom_message/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/pos_custom_message/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/pos_custom_message/static/description/assets/misc/support-email.svg b/pos_custom_message/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/pos_custom_message/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/pos_custom_message/static/description/assets/misc/tick-mark.svg b/pos_custom_message/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/pos_custom_message/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/pos_custom_message/static/description/assets/misc/whatsapp 1.svg b/pos_custom_message/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/pos_custom_message/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/pos_custom_message/static/description/assets/misc/whatsapp.svg b/pos_custom_message/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/pos_custom_message/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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..0e311ca87 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..a0ac2d840 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..cb17cf612 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.jpg b/pos_custom_message/static/description/assets/modules/4.jpg new file mode 100644 index 000000000..67c7f7062 Binary files /dev/null and b/pos_custom_message/static/description/assets/modules/4.jpg differ diff --git a/pos_custom_message/static/description/assets/modules/5.png b/pos_custom_message/static/description/assets/modules/5.png new file mode 100644 index 000000000..8513873ea Binary files /dev/null and b/pos_custom_message/static/description/assets/modules/5.png differ diff --git a/pos_custom_message/static/description/assets/modules/6.jpg b/pos_custom_message/static/description/assets/modules/6.jpg new file mode 100644 index 000000000..73781cf50 Binary files /dev/null and b/pos_custom_message/static/description/assets/modules/6.jpg 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..ca3b65bea Binary files /dev/null and b/pos_custom_message/static/description/assets/screenshots/hero.gif differ diff --git a/pos_custom_message/static/description/assets/screenshots/scrnshot-1.png b/pos_custom_message/static/description/assets/screenshots/scrnshot-1.png new file mode 100644 index 000000000..a0ef879d9 Binary files /dev/null and b/pos_custom_message/static/description/assets/screenshots/scrnshot-1.png differ diff --git a/pos_custom_message/static/description/assets/screenshots/scrnshot-2.png b/pos_custom_message/static/description/assets/screenshots/scrnshot-2.png new file mode 100644 index 000000000..d485b4219 Binary files /dev/null and b/pos_custom_message/static/description/assets/screenshots/scrnshot-2.png differ diff --git a/pos_custom_message/static/description/assets/screenshots/scrnshot-3.png b/pos_custom_message/static/description/assets/screenshots/scrnshot-3.png new file mode 100644 index 000000000..9bad9cd3c Binary files /dev/null and b/pos_custom_message/static/description/assets/screenshots/scrnshot-3.png differ diff --git a/pos_custom_message/static/description/assets/screenshots/scrnshot-4.png b/pos_custom_message/static/description/assets/screenshots/scrnshot-4.png new file mode 100644 index 000000000..2a734516f Binary files /dev/null and b/pos_custom_message/static/description/assets/screenshots/scrnshot-4.png differ diff --git a/pos_custom_message/static/description/assets/screenshots/scrnshot-5.png b/pos_custom_message/static/description/assets/screenshots/scrnshot-5.png new file mode 100644 index 000000000..173ab9a1b Binary files /dev/null and b/pos_custom_message/static/description/assets/screenshots/scrnshot-5.png differ diff --git a/pos_custom_message/static/description/assets/screenshots/scrnshot-6.png b/pos_custom_message/static/description/assets/screenshots/scrnshot-6.png new file mode 100644 index 000000000..25929374a Binary files /dev/null and b/pos_custom_message/static/description/assets/screenshots/scrnshot-6.png 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..ba27e22ab 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..263636162 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..cf3d54400 --- /dev/null +++ b/pos_custom_message/static/description/index.html @@ -0,0 +1,606 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+
+
+
+
+

+ POS Custom Message

+

+ Custom Popup Messages in POS Screen. +

+
+ +
+
+
+
+
+

Key Highlights +

+
+
+
+
+
+ +
+
+

Display custom messages at specific times in POS + system.

+

Users can specify the message + title, text, and the time at which they want the message to be displayed + in the POS screen. +

+
+
+
+
+
+
+ +
+
+

Allows users to create three types of custom messages.

+

Alert, Warning, and Information +

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

+ 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.

+
+
+
+ + +
+
+
+
    +
  • + 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. +
  • + +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:07th February 2024 +
+

+ + Initial Commit for POS Custom Message.

+
+
+
+
+
+
+
+

Related Products

+
+
+ +
+
+

Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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 + 99456767686
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/pos_custom_message/static/src/js/Popup/AlertPopup.js b/pos_custom_message/static/src/js/Popup/AlertPopup.js new file mode 100644 index 000000000..95777c907 --- /dev/null +++ b/pos_custom_message/static/src/js/Popup/AlertPopup.js @@ -0,0 +1,15 @@ +/** @odoo-module */ +import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup"; +import { _lt } from '@web/core/l10n/translation'; +/** + * CustomMessageAlertPopup component for displaying custom messages as an alert popup. + * Inherits from AbstractAwaitablePopup. + */ +export class CustomMessageAlertPopup extends AbstractAwaitablePopup { + static template = "pos_custom_message.CustomMessageAlertPopup"; + static defaultProps = { + confirmText: _lt('Ok'), + title: '', + body: '', + }; +} diff --git a/pos_custom_message/static/src/js/Popup/InfoPopup.js b/pos_custom_message/static/src/js/Popup/InfoPopup.js new file mode 100644 index 000000000..8cb9bd635 --- /dev/null +++ b/pos_custom_message/static/src/js/Popup/InfoPopup.js @@ -0,0 +1,15 @@ +/** @odoo-module */ +import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup"; +import { _lt } from '@web/core/l10n/translation'; +/** + * CustomMessageInfoPopup component for displaying custom messages as an informational popup. + * Inherits from AbstractAwaitablePopup. + */ +export class CustomMessageInfoPopup extends AbstractAwaitablePopup { + static template = "pos_custom_message.CustomMessageInfoPopup"; + static defaultProps = { + confirmText: _lt('Ok'), + title: '', + body: '', + }; +} diff --git a/pos_custom_message/static/src/js/Popup/WarningPopup.js b/pos_custom_message/static/src/js/Popup/WarningPopup.js new file mode 100644 index 000000000..72821d4db --- /dev/null +++ b/pos_custom_message/static/src/js/Popup/WarningPopup.js @@ -0,0 +1,15 @@ +/** @odoo-module */ +import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup"; +import { _lt } from '@web/core/l10n/translation'; +/** + * CustomMessageWarnPopup component for displaying custom messages as a warning popup. + * Inherits from AbstractAwaitablePopup. + */ +export class CustomMessageWarnPopup extends AbstractAwaitablePopup { + static template = "pos_custom_message.CustomMessageWarnPopup"; + static defaultProps = { + confirmText: _lt('Ok'), + title: '', + body: '', + }; +} diff --git a/pos_custom_message/static/src/js/Popup/pos_popup_templates.xml b/pos_custom_message/static/src/js/Popup/pos_popup_templates.xml new file mode 100644 index 000000000..5d738edfe --- /dev/null +++ b/pos_custom_message/static/src/js/Popup/pos_popup_templates.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + 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..511d1daef --- /dev/null +++ b/pos_custom_message/static/src/js/PosSession.js @@ -0,0 +1,12 @@ +/** @odoo-module */ +import { patch } from "@web/core/utils/patch"; +import { PosStore } from "@point_of_sale/app/store/pos_store"; + +//Patching the PosStore to load the data from the model pos.custom.message +patch(PosStore.prototype, { + //For loading the data from the model pos.custom.message + async _processData(loadedData) { + await super._processData(...arguments); + this.pos_custom_message = loadedData["pos.custom.message"]; + } +}); 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..b7e78e877 --- /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/app/screens/product_screen/product_screen"; +import { patch } from "@web/core/utils/patch"; +import { CustomMessageAlertPopup } from "@pos_custom_message/js/Popup/AlertPopup"; +import { CustomMessageInfoPopup } from "@pos_custom_message/js/Popup/InfoPopup"; +import { CustomMessageWarnPopup } from "@pos_custom_message/js/Popup/WarningPopup"; + + +// Patching the ProductScreen to add Section function +patch(ProductScreen.prototype, { + setup() { + super.setup(); + var self = this; + setInterval(function () { + const messages = self.env.services.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.popup.add(CustomMessageAlertPopup, { + title: msg.title, + body: msg.message_text, + }); + if (msg.message_type == "warn") + // Warning message popup + self.popup.add(CustomMessageWarnPopup, { + title: msg.title, + body: msg.message_text, + }); + if (msg.message_type == "info") + // Information message popup + self.popup.add(CustomMessageInfoPopup, { + title: msg.title, + body: msg.message_text, + }); + } + }); + } + }, 1000); + }, +}); 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..1d5bf91f3 --- /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 + + + +
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..88d004e49 --- /dev/null +++ b/pos_custom_message/views/res_config_settings_views.xml @@ -0,0 +1,23 @@ + + + + + + res.config.settings.view.form.inherit.pos.custom.message + + res.config.settings + + + + + + + + + + + +