diff --git a/pos_customer_feedback/README.rst b/pos_customer_feedback/README.rst new file mode 100644 index 000000000..3286a834c --- /dev/null +++ b/pos_customer_feedback/README.rst @@ -0,0 +1,52 @@ +.. 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 Customer Feedback +===================== +Customers can provide their feedback as rating and comments in POS + +Installation +------------ + - www.odoo.com/documentation/16.0/setup/install.html + - Install our custom addon + +Configuration +------------- +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Affero General Public License v3.0 (AGPL v3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +Developer : (V16) Shafna K@ 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_customer_feedback/__init__.py b/pos_customer_feedback/__init__.py new file mode 100644 index 000000000..b5834fb29 --- /dev/null +++ b/pos_customer_feedback/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Shafna K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import models diff --git a/pos_customer_feedback/__manifest__.py b/pos_customer_feedback/__manifest__.py new file mode 100644 index 000000000..e5dc4b3cf --- /dev/null +++ b/pos_customer_feedback/__manifest__.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Shafna K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +{ + 'name': "POS Customer Feedback", + 'version': '16.0.1.0.0', + 'category': 'Point of Sale', + 'summary': 'Customer Feedback in PoS', + 'description': """This module enables the management of customer feedback + in Odoo. It provides functionality to handle customer feedback in both + ratings and comments, ensuring effective feedback management. With this + module, businesses can gather and utilize valuable customer feedback to + enhance their products and services.""", + 'author': " Cybrosys Techno Solutions", + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'point_of_sale'], + 'data': [ + 'views/pos_order_views.xml', + ], + 'assets': { + 'point_of_sale.assets': [ + 'pos_customer_feedback/static/src/xml/feedback_popup_template.xml', + 'pos_customer_feedback/static/src/js/feedback_popup.js', + 'pos_customer_feedback/static/src/xml/customer_feedback_template.xml', + 'pos_customer_feedback/static/src/js/customer_feedback.js', + 'pos_customer_feedback/static/src/js/order_summary.js', + 'pos_customer_feedback/static/src/xml/order_summary_template.xml', + 'pos_customer_feedback/static/src/css/customer_feedback.css', + ] + }, + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'application': False, + 'auto_install': False, +} diff --git a/pos_customer_feedback/doc/RELEASE_NOTES.md b/pos_customer_feedback/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..e1ec59b94 --- /dev/null +++ b/pos_customer_feedback/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 09.08.2023 +#### Version 16.0.1.0.0 +#### ADD + + - Initial Commit for POS Customer Feedback diff --git a/pos_customer_feedback/models/__init__.py b/pos_customer_feedback/models/__init__.py new file mode 100644 index 000000000..fa87ac0a8 --- /dev/null +++ b/pos_customer_feedback/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Shafna K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import pos_order diff --git a/pos_customer_feedback/models/pos_order.py b/pos_customer_feedback/models/pos_order.py new file mode 100644 index 000000000..3edf38614 --- /dev/null +++ b/pos_customer_feedback/models/pos_order.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Shafna K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import api, fields, models + + +class PosOrder(models.Model): + """To add feedback fields and store its value in pos order""" + _inherit = "pos.order" + + feedback = fields.Char(string='Feedback', readonly=True, + help="Please provide your feedback") + rating = fields.Char(string='Rating', help="Provide your ratings", + compute='_compute_rating') + comment = fields.Text(string='Comments', readonly=True, + help="Provide the feedbacks in comments") + + def _order_fields(self, ui_order): + """To get the value of field in pos session to pos order""" + res = super()._order_fields(ui_order) + res['feedback'] = ui_order.get('customer_feedback') + res['comment'] = ui_order.get('comment_feedback') + return res + + @api.depends('feedback') + def _compute_rating(self): + """To print star in pos order based on the rating value + choosing from pos session""" + self.rating = False + if self.feedback: + self.rating = '\u2B50' * int(self.feedback) diff --git a/pos_customer_feedback/static/description/assets/icons/check.png b/pos_customer_feedback/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/pos_customer_feedback/static/description/assets/icons/check.png differ diff --git a/pos_customer_feedback/static/description/assets/icons/chevron.png b/pos_customer_feedback/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/pos_customer_feedback/static/description/assets/icons/chevron.png differ diff --git a/pos_customer_feedback/static/description/assets/icons/cogs.png b/pos_customer_feedback/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/pos_customer_feedback/static/description/assets/icons/cogs.png differ diff --git a/pos_customer_feedback/static/description/assets/icons/consultation.png b/pos_customer_feedback/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/pos_customer_feedback/static/description/assets/icons/consultation.png differ diff --git a/pos_customer_feedback/static/description/assets/icons/ecom-black.png b/pos_customer_feedback/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/pos_customer_feedback/static/description/assets/icons/ecom-black.png differ diff --git a/pos_customer_feedback/static/description/assets/icons/education-black.png b/pos_customer_feedback/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/pos_customer_feedback/static/description/assets/icons/education-black.png differ diff --git a/pos_customer_feedback/static/description/assets/icons/hotel-black.png b/pos_customer_feedback/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/pos_customer_feedback/static/description/assets/icons/hotel-black.png differ diff --git a/pos_customer_feedback/static/description/assets/icons/license.png b/pos_customer_feedback/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/pos_customer_feedback/static/description/assets/icons/license.png differ diff --git a/pos_customer_feedback/static/description/assets/icons/lifebuoy.png b/pos_customer_feedback/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/pos_customer_feedback/static/description/assets/icons/lifebuoy.png differ diff --git a/pos_customer_feedback/static/description/assets/icons/manufacturing-black.png b/pos_customer_feedback/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/pos_customer_feedback/static/description/assets/icons/manufacturing-black.png differ diff --git a/pos_customer_feedback/static/description/assets/icons/pos-black.png b/pos_customer_feedback/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/pos_customer_feedback/static/description/assets/icons/pos-black.png differ diff --git a/pos_customer_feedback/static/description/assets/icons/puzzle.png b/pos_customer_feedback/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/pos_customer_feedback/static/description/assets/icons/puzzle.png differ diff --git a/pos_customer_feedback/static/description/assets/icons/restaurant-black.png b/pos_customer_feedback/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/pos_customer_feedback/static/description/assets/icons/restaurant-black.png differ diff --git a/pos_customer_feedback/static/description/assets/icons/service-black.png b/pos_customer_feedback/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/pos_customer_feedback/static/description/assets/icons/service-black.png differ diff --git a/pos_customer_feedback/static/description/assets/icons/trading-black.png b/pos_customer_feedback/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/pos_customer_feedback/static/description/assets/icons/trading-black.png differ diff --git a/pos_customer_feedback/static/description/assets/icons/training.png b/pos_customer_feedback/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/pos_customer_feedback/static/description/assets/icons/training.png differ diff --git a/pos_customer_feedback/static/description/assets/icons/update.png b/pos_customer_feedback/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/pos_customer_feedback/static/description/assets/icons/update.png differ diff --git a/pos_customer_feedback/static/description/assets/icons/user.png b/pos_customer_feedback/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/pos_customer_feedback/static/description/assets/icons/user.png differ diff --git a/pos_customer_feedback/static/description/assets/icons/wrench.png b/pos_customer_feedback/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/pos_customer_feedback/static/description/assets/icons/wrench.png differ diff --git a/pos_customer_feedback/static/description/assets/misc/categories.png b/pos_customer_feedback/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/pos_customer_feedback/static/description/assets/misc/categories.png differ diff --git a/pos_customer_feedback/static/description/assets/misc/check-box.png b/pos_customer_feedback/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/pos_customer_feedback/static/description/assets/misc/check-box.png differ diff --git a/pos_customer_feedback/static/description/assets/misc/compass.png b/pos_customer_feedback/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/pos_customer_feedback/static/description/assets/misc/compass.png differ diff --git a/pos_customer_feedback/static/description/assets/misc/corporate.png b/pos_customer_feedback/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/pos_customer_feedback/static/description/assets/misc/corporate.png differ diff --git a/pos_customer_feedback/static/description/assets/misc/customer-support.png b/pos_customer_feedback/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/pos_customer_feedback/static/description/assets/misc/customer-support.png differ diff --git a/pos_customer_feedback/static/description/assets/misc/cybrosys-logo.png b/pos_customer_feedback/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/pos_customer_feedback/static/description/assets/misc/cybrosys-logo.png differ diff --git a/pos_customer_feedback/static/description/assets/misc/features.png b/pos_customer_feedback/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/pos_customer_feedback/static/description/assets/misc/features.png differ diff --git a/pos_customer_feedback/static/description/assets/misc/logo.png b/pos_customer_feedback/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/pos_customer_feedback/static/description/assets/misc/logo.png differ diff --git a/pos_customer_feedback/static/description/assets/misc/pictures.png b/pos_customer_feedback/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/pos_customer_feedback/static/description/assets/misc/pictures.png differ diff --git a/pos_customer_feedback/static/description/assets/misc/pie-chart.png b/pos_customer_feedback/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/pos_customer_feedback/static/description/assets/misc/pie-chart.png differ diff --git a/pos_customer_feedback/static/description/assets/misc/right-arrow.png b/pos_customer_feedback/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/pos_customer_feedback/static/description/assets/misc/right-arrow.png differ diff --git a/pos_customer_feedback/static/description/assets/misc/star.png b/pos_customer_feedback/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/pos_customer_feedback/static/description/assets/misc/star.png differ diff --git a/pos_customer_feedback/static/description/assets/misc/support.png b/pos_customer_feedback/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/pos_customer_feedback/static/description/assets/misc/support.png differ diff --git a/pos_customer_feedback/static/description/assets/misc/whatsapp.png b/pos_customer_feedback/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/pos_customer_feedback/static/description/assets/misc/whatsapp.png differ diff --git a/pos_customer_feedback/static/description/assets/modules/1.png b/pos_customer_feedback/static/description/assets/modules/1.png new file mode 100644 index 000000000..489f44e86 Binary files /dev/null and b/pos_customer_feedback/static/description/assets/modules/1.png differ diff --git a/pos_customer_feedback/static/description/assets/modules/2.png b/pos_customer_feedback/static/description/assets/modules/2.png new file mode 100644 index 000000000..4f9e87f6e Binary files /dev/null and b/pos_customer_feedback/static/description/assets/modules/2.png differ diff --git a/pos_customer_feedback/static/description/assets/modules/3.png b/pos_customer_feedback/static/description/assets/modules/3.png new file mode 100644 index 000000000..e571015b1 Binary files /dev/null and b/pos_customer_feedback/static/description/assets/modules/3.png differ diff --git a/pos_customer_feedback/static/description/assets/modules/4.png b/pos_customer_feedback/static/description/assets/modules/4.png new file mode 100644 index 000000000..624ef69b7 Binary files /dev/null and b/pos_customer_feedback/static/description/assets/modules/4.png differ diff --git a/pos_customer_feedback/static/description/assets/modules/5.gif b/pos_customer_feedback/static/description/assets/modules/5.gif new file mode 100644 index 000000000..8f40aab85 Binary files /dev/null and b/pos_customer_feedback/static/description/assets/modules/5.gif differ diff --git a/pos_customer_feedback/static/description/assets/modules/6.png b/pos_customer_feedback/static/description/assets/modules/6.png new file mode 100644 index 000000000..31ed46762 Binary files /dev/null and b/pos_customer_feedback/static/description/assets/modules/6.png differ diff --git a/pos_customer_feedback/static/description/assets/screenshots/feedback-01.png b/pos_customer_feedback/static/description/assets/screenshots/feedback-01.png new file mode 100644 index 000000000..cab8091fa Binary files /dev/null and b/pos_customer_feedback/static/description/assets/screenshots/feedback-01.png differ diff --git a/pos_customer_feedback/static/description/assets/screenshots/feedback-02.png b/pos_customer_feedback/static/description/assets/screenshots/feedback-02.png new file mode 100644 index 000000000..b54a28351 Binary files /dev/null and b/pos_customer_feedback/static/description/assets/screenshots/feedback-02.png differ diff --git a/pos_customer_feedback/static/description/assets/screenshots/feedback-03.png b/pos_customer_feedback/static/description/assets/screenshots/feedback-03.png new file mode 100644 index 000000000..05ae3c7f0 Binary files /dev/null and b/pos_customer_feedback/static/description/assets/screenshots/feedback-03.png differ diff --git a/pos_customer_feedback/static/description/assets/screenshots/feedback-04.png b/pos_customer_feedback/static/description/assets/screenshots/feedback-04.png new file mode 100644 index 000000000..176b322a3 Binary files /dev/null and b/pos_customer_feedback/static/description/assets/screenshots/feedback-04.png differ diff --git a/pos_customer_feedback/static/description/assets/screenshots/feedback.gif b/pos_customer_feedback/static/description/assets/screenshots/feedback.gif new file mode 100644 index 000000000..3ba6d7a5a Binary files /dev/null and b/pos_customer_feedback/static/description/assets/screenshots/feedback.gif differ diff --git a/pos_customer_feedback/static/description/banner.jpg b/pos_customer_feedback/static/description/banner.jpg new file mode 100644 index 000000000..d0560d00b Binary files /dev/null and b/pos_customer_feedback/static/description/banner.jpg differ diff --git a/pos_customer_feedback/static/description/icon.png b/pos_customer_feedback/static/description/icon.png new file mode 100644 index 000000000..92f245147 Binary files /dev/null and b/pos_customer_feedback/static/description/icon.png differ diff --git a/pos_customer_feedback/static/description/index.html b/pos_customer_feedback/static/description/index.html new file mode 100644 index 000000000..71f62be5a --- /dev/null +++ b/pos_customer_feedback/static/description/index.html @@ -0,0 +1,577 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ POS Customer Feedback +

+

+ This module helps the customer to provide their feedbacks

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

+ Explore This Module

+
+ + + +
+
+ +
+

+ Overview +

+
+
+
+ This module enhances the Point of Sale (POS) system by enabling + customers to provide their ratings and feedback. It empowers customers + to share their experiences and opinions seamlessly within the POS + environment. By incorporating this module, businesses can gather + valuable insights and improve their services based on customer feedback. +
+
+ + +
+
+ +
+

+ Features +

+
+
+
+
+ + Simplified method to provide customer feedback +
+
+ + Customers can provide feedback in both ratings and comments +
+
+ + In each POS orders we can see the customer feedback if provided +
+
+ + Simplified work flow +
+
+
+ + +
+
+ +
+

+ Screenshots +

+
+
+
+
+

+ Choose a customer and then click on the control button "Feedback" + to provide the feedback +

+ +
+
+

+ A Popup opens in which you can share the feedback +

+ +
+
+

+ Rating provided can be seen in the order summary +

+ +
+
+

+ Rating and comments can be viewed in pos order feedback page +

+ +
+
+
+ + +
+
+ +
+

+ Related Products +

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

+ Our Services +

+
+
+
+
+
+ +
+
+ Odoo Customization
+
+
+
+ +
+
+ Odoo Implementation
+
+
+
+ +
+
+ Odoo Support
+
+
+
+ +
+
+ Hire Odoo Developer
+
+
+
+ +
+
+ Odoo Integration
+
+
+
+ +
+
+ Odoo Migration
+
+
+
+ +
+
+ Odoo Consultancy
+
+
+
+ +
+
+ Odoo Implementation
+
+
+
+ +
+
+ Odoo Licensing Consultancy
+
+
+
+ + +
+
+ +
+

+ Our Industries +

+
+
+
+
+
+ +
+ Trading +
+

+ Easily procure and sell your products

+
+
+
+
+ +
+ POS +
+

+ Easy configuration and convivial experience

+
+
+
+
+ +
+ Education +
+

+ A platform for educational management

+
+
+
+
+ +
+ Manufacturing +
+

+ Plan, track and schedule your operations

+
+
+
+
+ +
+ E-commerce & Website +
+

+ Mobile friendly, awe-inspiring product pages

+
+
+
+
+ +
+ Service Management +
+

+ Keep track of services and invoice

+
+
+
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+
+
+ +
+ Hotel Management +
+

+ An all-inclusive hotel management application

+
+
+
+
+ + +
+
+ +
+

+ Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? + Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+ +91 86068 27707

+
+
+
+
+
+
+
+ +
+
+
+ diff --git a/pos_customer_feedback/static/src/css/customer_feedback.css b/pos_customer_feedback/static/src/css/customer_feedback.css new file mode 100644 index 000000000..d9aca5711 --- /dev/null +++ b/pos_customer_feedback/static/src/css/customer_feedback.css @@ -0,0 +1,73 @@ +.rating { + display: inline-block; + position: relative; + height: 50px; + line-height: 50px; + font-size: 50px; +} +.rating label { + position: absolute; + top: 0; + left: 0; + height: 100%; + cursor: pointer; +} +.rating label:last-child { + position: static; +} +.rating label:nth-child(1) { + z-index: 5; +} +.rating label:nth-child(2) { + z-index: 4; +} +.rating label:nth-child(3) { + z-index: 3; +} +.rating label:nth-child(4) { + z-index: 2; +} +.rating label:nth-child(5) { + z-index: 1; +} +.rating label input { + position: absolute; + top: 0; + left: 0; + opacity: 0; +} +.rating label .icon { + float: left; + color: transparent; +} +.rating label:last-child .icon { + color: #000; +} +.rating:not(:hover) label input:checked ~ .icon, +.rating:hover label:hover input ~ .icon { + color: #e5bd41; +} +.rating label input:focus:not(:checked) ~ .icon:last-child { + color: #000; + text-shadow: 0 0 5px #09f; +} +.stars-outer { + display: inline-block; + position: relative; + font-family: FontAwesome; +} +.stars-outer::before { + content: "\f006 \f006 \f006 \f006 \f006"; +} +.stars-inner { + position: absolute; + top: 0; + left: 0; + white-space: nowrap; + overflow: hidden; + width: 0; +} +.stars-inner::before { + content: "\f005 \f005 \f005 \f005 \f005"; + color: #f8ce0b; +} diff --git a/pos_customer_feedback/static/src/js/customer_feedback.js b/pos_customer_feedback/static/src/js/customer_feedback.js new file mode 100644 index 000000000..0b568bb2b --- /dev/null +++ b/pos_customer_feedback/static/src/js/customer_feedback.js @@ -0,0 +1,66 @@ +/** @odoo-module **/ +/** + * Defines CustomerFeedback which extends PosComponent + * + */ +import PosComponent from 'point_of_sale.PosComponent'; +import ProductScreen from "point_of_sale.ProductScreen"; +import Registries from "point_of_sale.Registries"; +import { useListener } from "@web/core/utils/hooks"; +import { useRef, onMounted } from "@odoo/owl" + +class CustomerFeedback extends PosComponent { + /** + * Performs setup tasks for the CustomerFeedback component. + */ + setup() { + super.setup(); + useListener('click', this.onClick); + this.feedback_Customer = useRef('input-data') + onMounted(()=>{ + const starValue = this.env.pos.selectedOrder.customer_feedback + if (starValue){ + this.setStarRating(starValue); + } + }) + } + /** + * Sets the star rating based on the provided value. + * + * @param {number} starValue - The value representing the star rating. + */ + setStarRating(starValue){ + let newStarValue = starValue || 0; + const starPercentage = (parseInt(newStarValue)/ 5) * 100; + const starPercentageRounded = `${(Math.round(starPercentage / 10) * 10)}%`; + document.querySelector(`.stars-inner`).style.width =starPercentageRounded + } + /** + * Handles the click event when the feedback component is clicked. + * + * @param {Event} ev - The click event object. + */ + async onClick(ev) { + let partner = this.env.pos.get_order().get_partner(); + let selectedOrderline = this.env.pos.get_order().get_selected_orderline(); + if (!partner || !selectedOrderline) return; + + const { confirmed, payload: inputFeedback } = await this.showPopup( + 'FeedbackPopup', { + startingValue: this.env.pos.get_order().get_comment_feedback(), + title: this.env._t('Customer Feedback'), + }); + + if (confirmed) { + this.env.pos.selectedOrder.comment_feedback = inputFeedback.commentValue; + this.env.pos.selectedOrder.customer_feedback = inputFeedback.ratingValue; + this.setStarRating(inputFeedback.ratingValue) + } + } +} +CustomerFeedback.template = 'CustomerFeedback'; +ProductScreen.addControlButton({ + component: CustomerFeedback, +}); +Registries.Component.add(CustomerFeedback); +return CustomerFeedback; diff --git a/pos_customer_feedback/static/src/js/feedback_popup.js b/pos_customer_feedback/static/src/js/feedback_popup.js new file mode 100644 index 000000000..e5535cbf4 --- /dev/null +++ b/pos_customer_feedback/static/src/js/feedback_popup.js @@ -0,0 +1,66 @@ +/** @odoo-module **/ +/** + * Defines AbstractAwaitablePopup extending from AbstractAwaitablePopup + */ +const AbstractAwaitablePopup = require('point_of_sale.AbstractAwaitablePopup'); +import Registries from 'point_of_sale.Registries'; +import { _lt } from '@web/core/l10n/translation'; +import { onMounted, useRef, useState } from "@odoo/owl"; + +class FeedbackPopup extends AbstractAwaitablePopup { + /** + * @param {Object} props + * @param {string} props.startingValue + */ + setup() { + super.setup(); + this.state = useState({ + ratingValue:'', + commentValue: this.props.startingValue + }); + this.CommentRef = useRef('comment') + onMounted(this.onMounted); + } + /** + * Called after the component is mounted. + * Sets focus on the comment input field. + */ + onMounted() { + this.CommentRef.el.focus(); + } + /** + * Handles the change event of the rating input field. + * Updates the rating value and adjusts the star percentage accordingly. + * + * @param {Event} ev - The change event object. + */ + async RatingChange(ev) { + if(!isNaN(parseInt(ev.target.value))){ + this.state.ratingValue=ev.target.value; + const starTotal = 5; + const starPercentage = (this.state.ratingValue/ starTotal) * 100; + const starPercentageRounded = `${(Math.round(starPercentage / 10) * 10)}%`; + document.querySelector(`.stars-inner`).style.width = starPercentageRounded; + } + } + /** + * Retrieves the payload data to be returned when the popup is confirmed. + * + * @returns {Object} The payload data containing the ratingValue and commentValue. + */ + getPayload() { + return { + ratingValue : this.state.ratingValue, + commentValue: this.state.commentValue, + } + } +} +FeedbackPopup.template = 'FeedbackPopup'; +FeedbackPopup.defaultProps = { + confirmText: _lt('Ok'), + cancelText: _lt('Cancel'), + title: '', + body: '', +}; +Registries.Component.add(FeedbackPopup); +return FeedbackPopup; diff --git a/pos_customer_feedback/static/src/js/order_summary.js b/pos_customer_feedback/static/src/js/order_summary.js new file mode 100644 index 000000000..81d346f55 --- /dev/null +++ b/pos_customer_feedback/static/src/js/order_summary.js @@ -0,0 +1,60 @@ +/** @odoo-module **/ +/** + * Defines CustFeedback which extends Order from point of sale models + * + * Initialize the additional properties from JSON and export the additional + properties as JSON + */ +import models from 'point_of_sale.models'; +import { Order } from 'point_of_sale.models'; +import Registries from "point_of_sale.Registries"; +const CustFeedback = (Order) => class CustFeedback extends Order { + /** + * Initializes the CustFeedback class. + */ + constructor() { + super(...arguments); + this.customer_feedback = this.customer_feedback || null; + this.comment_feedback = this.comment_feedback || null; + } + /** + * Sets the comment and customer feedback values. + * + * @param {Object} comment_feedback - Object containing the comment and + rating values. + */ + set_comment_feedback(comment_feedback){ + this.comment_feedback = comment_feedback.commentValue + this.customer_feedback = comment_feedback.ratingValue + } + /** + * Returns the comment feedback value. + * + * @returns {string|null} - The comment feedback value. + */ + get_comment_feedback(){ + return this.comment_feedback + } + /** + * Exports the CustFeedback properties as JSON. + * + * @returns {Object} - The CustFeedback properties as JSON. + */ + export_as_JSON() { + const json = super.export_as_JSON(...arguments) + json.customer_feedback = this.customer_feedback ; + json.comment_feedback = this.comment_feedback + return json; + } + /** + * Initializes the CustFeedback properties from JSON. + * + * @param {Object} json - The JSON object containing the CustFeedback properties. + */ + init_from_JSON(json) { + super.init_from_JSON(...arguments); + this.customer_feedback = json.customer_feedback; + this.comment_feedback = json.comment_feedback; + } + }; +Registries.Model.extend(Order, CustFeedback); diff --git a/pos_customer_feedback/static/src/xml/customer_feedback_template.xml b/pos_customer_feedback/static/src/xml/customer_feedback_template.xml new file mode 100644 index 000000000..cd408e81b --- /dev/null +++ b/pos_customer_feedback/static/src/xml/customer_feedback_template.xml @@ -0,0 +1,11 @@ + + + + +
+ + + Feedback +
+
+
diff --git a/pos_customer_feedback/static/src/xml/feedback_popup_template.xml b/pos_customer_feedback/static/src/xml/feedback_popup_template.xml new file mode 100644 index 000000000..9e826f2ad --- /dev/null +++ b/pos_customer_feedback/static/src/xml/feedback_popup_template.xml @@ -0,0 +1,59 @@ + + + + + +