diff --git a/customer_order_comment/README.rst b/customer_order_comment/README.rst new file mode 100644 index 000000000..b16144ce0 --- /dev/null +++ b/customer_order_comment/README.rst @@ -0,0 +1,41 @@ +.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Customer Order Comment +====================== +This module helps you to add customer rating and comments through website. + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developers: version 16: Athira Premanand @cybrosys, Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/customer_order_comment/__init__.py b/customer_order_comment/__init__.py new file mode 100644 index 000000000..a3d0e221b --- /dev/null +++ b/customer_order_comment/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Technologies () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models +from . import controllers diff --git a/customer_order_comment/__manifest__.py b/customer_order_comment/__manifest__.py new file mode 100644 index 000000000..04bcff546 --- /dev/null +++ b/customer_order_comment/__manifest__.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Technologies () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################### +{ + 'name': 'Customer Order Comment', + 'version': '16.0.1.0.0', + 'summary': """ + This module helps you to add customer rating and comments through website. + """, + 'description': """This module can be used to manage the customer rating and + comments. The comments and rating added through website can be viewed in + respective sale order. + """, + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'category': 'Website/Website', + 'maintainer': 'Cybrosys Techno Solutions', + 'depends': ['base', 'sale', 'website', 'website_sale'], + 'data': [ + 'views/sale_order_views.xml', + 'views/res_config_settings_views.xml', + 'views/customer_order_comment_templates.xml' + ], + 'assets': { + 'web.assets_frontend': [ + 'customer_order_comment/static/src/js/review_and_rating.js', + 'customer_order_comment/static/src/css/review_and_rating.css' + ], + }, + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False +} diff --git a/customer_order_comment/controllers/__init__.py b/customer_order_comment/controllers/__init__.py new file mode 100644 index 000000000..fde6b9c78 --- /dev/null +++ b/customer_order_comment/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Technologies () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import customer_order_comment diff --git a/customer_order_comment/controllers/customer_order_comment.py b/customer_order_comment/controllers/customer_order_comment.py new file mode 100644 index 000000000..c2c40f61a --- /dev/null +++ b/customer_order_comment/controllers/customer_order_comment.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Technologies () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################### +"""" +This module is used to add new route /final/customer_rating for adding the +review(comment) and rating from the website. +""" +from odoo import http +from odoo.http import request + + +class CustomerRatingAndReview(http.Controller): + """ This class helps to take comment and rating from website. """ + @http.route('/final/customer_rating', type='http', auth="public", + website=True, sitemap=False) + def customer_order_rating(self, **kw): + """ This function helps to fetch the values of comment and rating """ + order_id = request.env['sale.order'].sudo().browse(int(kw['order_id'])) + order_id.comment = kw['comment'] + order_id.rating = kw['rate_value'] + return request.redirect('/shop/confirmation') diff --git a/customer_order_comment/doc/RELEASE_NOTES.md b/customer_order_comment/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..dda884f8e --- /dev/null +++ b/customer_order_comment/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 26.04.2023 +#### Version 16.0.1.0.0 +#### ADD +Initial Commit for Customer Order Comment diff --git a/customer_order_comment/models/__init__.py b/customer_order_comment/models/__init__.py new file mode 100644 index 000000000..5ca56851d --- /dev/null +++ b/customer_order_comment/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Technologies () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import sale_order +from . import res_config_settings diff --git a/customer_order_comment/models/res_config_settings.py b/customer_order_comment/models/res_config_settings.py new file mode 100644 index 000000000..ecee64132 --- /dev/null +++ b/customer_order_comment/models/res_config_settings.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Technologies () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################### +""" This module inherits res.config.settings to add new setting. """ +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + """ + Inherits res.config.settings to add new setting for toggle the feature. + """ + _inherit = 'res.config.settings' + + comment_configuration = fields.Boolean( + config_parameter='customer_order_comment.comment_configuration', + string='Comment Configuration', help='Enable/ Disable the feature.') diff --git a/customer_order_comment/models/sale_order.py b/customer_order_comment/models/sale_order.py new file mode 100644 index 000000000..8ea56e741 --- /dev/null +++ b/customer_order_comment/models/sale_order.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Technologies () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################### +""" This module inherits sale.order to add new fields. """ +from odoo import fields, models + + +class SaleOrder(models.Model): + """ Inherits sale.order to add the fields comment and rating """ + _inherit = 'sale.order' + + comment = fields.Char(string='Comment', readonly=True, + help='The comment provided by the customer.') + rating = fields.Selection([ + ('1', 'Poor'), ('2', 'Too Bad'), ('3', 'Average Quality'), + ('4', 'Nice'), ('5', 'Good')], string='Rating', readonly=True, + help='The rating provided by the customer.') diff --git a/customer_order_comment/static/description/assets/icons/check.png b/customer_order_comment/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/customer_order_comment/static/description/assets/icons/check.png differ diff --git a/customer_order_comment/static/description/assets/icons/chevron.png b/customer_order_comment/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/customer_order_comment/static/description/assets/icons/chevron.png differ diff --git a/customer_order_comment/static/description/assets/icons/cogs.png b/customer_order_comment/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/customer_order_comment/static/description/assets/icons/cogs.png differ diff --git a/customer_order_comment/static/description/assets/icons/consultation.png b/customer_order_comment/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/customer_order_comment/static/description/assets/icons/consultation.png differ diff --git a/customer_order_comment/static/description/assets/icons/ecom-black.png b/customer_order_comment/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/customer_order_comment/static/description/assets/icons/ecom-black.png differ diff --git a/customer_order_comment/static/description/assets/icons/education-black.png b/customer_order_comment/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/customer_order_comment/static/description/assets/icons/education-black.png differ diff --git a/customer_order_comment/static/description/assets/icons/hotel-black.png b/customer_order_comment/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/customer_order_comment/static/description/assets/icons/hotel-black.png differ diff --git a/customer_order_comment/static/description/assets/icons/license.png b/customer_order_comment/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/customer_order_comment/static/description/assets/icons/license.png differ diff --git a/customer_order_comment/static/description/assets/icons/lifebuoy.png b/customer_order_comment/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/customer_order_comment/static/description/assets/icons/lifebuoy.png differ diff --git a/customer_order_comment/static/description/assets/icons/manufacturing-black.png b/customer_order_comment/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/customer_order_comment/static/description/assets/icons/manufacturing-black.png differ diff --git a/customer_order_comment/static/description/assets/icons/pos-black.png b/customer_order_comment/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/customer_order_comment/static/description/assets/icons/pos-black.png differ diff --git a/customer_order_comment/static/description/assets/icons/puzzle.png b/customer_order_comment/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/customer_order_comment/static/description/assets/icons/puzzle.png differ diff --git a/customer_order_comment/static/description/assets/icons/restaurant-black.png b/customer_order_comment/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/customer_order_comment/static/description/assets/icons/restaurant-black.png differ diff --git a/customer_order_comment/static/description/assets/icons/service-black.png b/customer_order_comment/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/customer_order_comment/static/description/assets/icons/service-black.png differ diff --git a/customer_order_comment/static/description/assets/icons/trading-black.png b/customer_order_comment/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/customer_order_comment/static/description/assets/icons/trading-black.png differ diff --git a/customer_order_comment/static/description/assets/icons/training.png b/customer_order_comment/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/customer_order_comment/static/description/assets/icons/training.png differ diff --git a/customer_order_comment/static/description/assets/icons/update.png b/customer_order_comment/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/customer_order_comment/static/description/assets/icons/update.png differ diff --git a/customer_order_comment/static/description/assets/icons/user.png b/customer_order_comment/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/customer_order_comment/static/description/assets/icons/user.png differ diff --git a/customer_order_comment/static/description/assets/icons/wrench.png b/customer_order_comment/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/customer_order_comment/static/description/assets/icons/wrench.png differ diff --git a/customer_order_comment/static/description/assets/misc/categories.png b/customer_order_comment/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/customer_order_comment/static/description/assets/misc/categories.png differ diff --git a/customer_order_comment/static/description/assets/misc/check-box.png b/customer_order_comment/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/customer_order_comment/static/description/assets/misc/check-box.png differ diff --git a/customer_order_comment/static/description/assets/misc/compass.png b/customer_order_comment/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/customer_order_comment/static/description/assets/misc/compass.png differ diff --git a/customer_order_comment/static/description/assets/misc/corporate.png b/customer_order_comment/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/customer_order_comment/static/description/assets/misc/corporate.png differ diff --git a/customer_order_comment/static/description/assets/misc/customer-support.png b/customer_order_comment/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/customer_order_comment/static/description/assets/misc/customer-support.png differ diff --git a/customer_order_comment/static/description/assets/misc/cybrosys-logo.png b/customer_order_comment/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/customer_order_comment/static/description/assets/misc/cybrosys-logo.png differ diff --git a/customer_order_comment/static/description/assets/misc/features.png b/customer_order_comment/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/customer_order_comment/static/description/assets/misc/features.png differ diff --git a/customer_order_comment/static/description/assets/misc/logo.png b/customer_order_comment/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/customer_order_comment/static/description/assets/misc/logo.png differ diff --git a/customer_order_comment/static/description/assets/misc/pictures.png b/customer_order_comment/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/customer_order_comment/static/description/assets/misc/pictures.png differ diff --git a/customer_order_comment/static/description/assets/misc/pie-chart.png b/customer_order_comment/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/customer_order_comment/static/description/assets/misc/pie-chart.png differ diff --git a/customer_order_comment/static/description/assets/misc/right-arrow.png b/customer_order_comment/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/customer_order_comment/static/description/assets/misc/right-arrow.png differ diff --git a/customer_order_comment/static/description/assets/misc/star.png b/customer_order_comment/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/customer_order_comment/static/description/assets/misc/star.png differ diff --git a/customer_order_comment/static/description/assets/misc/support.png b/customer_order_comment/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/customer_order_comment/static/description/assets/misc/support.png differ diff --git a/customer_order_comment/static/description/assets/misc/whatsapp.png b/customer_order_comment/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/customer_order_comment/static/description/assets/misc/whatsapp.png differ diff --git a/customer_order_comment/static/description/assets/modules/1.png b/customer_order_comment/static/description/assets/modules/1.png new file mode 100644 index 000000000..df65629bf Binary files /dev/null and b/customer_order_comment/static/description/assets/modules/1.png differ diff --git a/customer_order_comment/static/description/assets/modules/2.png b/customer_order_comment/static/description/assets/modules/2.png new file mode 100644 index 000000000..6058f6c3b Binary files /dev/null and b/customer_order_comment/static/description/assets/modules/2.png differ diff --git a/customer_order_comment/static/description/assets/modules/3.png b/customer_order_comment/static/description/assets/modules/3.png new file mode 100644 index 000000000..163485cfd Binary files /dev/null and b/customer_order_comment/static/description/assets/modules/3.png differ diff --git a/customer_order_comment/static/description/assets/modules/4.png b/customer_order_comment/static/description/assets/modules/4.png new file mode 100644 index 000000000..618e3e6c4 Binary files /dev/null and b/customer_order_comment/static/description/assets/modules/4.png differ diff --git a/customer_order_comment/static/description/assets/modules/5.png b/customer_order_comment/static/description/assets/modules/5.png new file mode 100644 index 000000000..2a722d66e Binary files /dev/null and b/customer_order_comment/static/description/assets/modules/5.png differ diff --git a/customer_order_comment/static/description/assets/modules/6.png b/customer_order_comment/static/description/assets/modules/6.png new file mode 100644 index 000000000..a44d454aa Binary files /dev/null and b/customer_order_comment/static/description/assets/modules/6.png differ diff --git a/customer_order_comment/static/description/assets/screenshots/1.png b/customer_order_comment/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..012e5df3a Binary files /dev/null and b/customer_order_comment/static/description/assets/screenshots/1.png differ diff --git a/customer_order_comment/static/description/assets/screenshots/2.png b/customer_order_comment/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..76b7a157b Binary files /dev/null and b/customer_order_comment/static/description/assets/screenshots/2.png differ diff --git a/customer_order_comment/static/description/assets/screenshots/3.png b/customer_order_comment/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..8d30afe2f Binary files /dev/null and b/customer_order_comment/static/description/assets/screenshots/3.png differ diff --git a/customer_order_comment/static/description/assets/screenshots/4.png b/customer_order_comment/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..15d7baedb Binary files /dev/null and b/customer_order_comment/static/description/assets/screenshots/4.png differ diff --git a/customer_order_comment/static/description/assets/screenshots/5.png b/customer_order_comment/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..8e2f3efe1 Binary files /dev/null and b/customer_order_comment/static/description/assets/screenshots/5.png differ diff --git a/customer_order_comment/static/description/assets/screenshots/6.png b/customer_order_comment/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..95942db3a Binary files /dev/null and b/customer_order_comment/static/description/assets/screenshots/6.png differ diff --git a/customer_order_comment/static/description/assets/screenshots/hero.gif b/customer_order_comment/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..6ab75ca17 Binary files /dev/null and b/customer_order_comment/static/description/assets/screenshots/hero.gif differ diff --git a/customer_order_comment/static/description/banner.png b/customer_order_comment/static/description/banner.png new file mode 100644 index 000000000..75f0877e6 Binary files /dev/null and b/customer_order_comment/static/description/banner.png differ diff --git a/customer_order_comment/static/description/icon.png b/customer_order_comment/static/description/icon.png new file mode 100644 index 000000000..84d9df48a Binary files /dev/null and b/customer_order_comment/static/description/icon.png differ diff --git a/customer_order_comment/static/description/index.html b/customer_order_comment/static/description/index.html new file mode 100644 index 000000000..7d8b1dc5c --- /dev/null +++ b/customer_order_comment/static/description/index.html @@ -0,0 +1,538 @@ +
+ +
+ +
+
+ Community +
+
+
+ +
+
+
+ +

Customer Order Comment

+

+ Know your customer's comments and ratings, and view them on the sale order. +

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

Explore This Module

+
+ + + + +
+
+ +
+

Overview

+
+
+
+ Can your customer comment on their order while placing an order? It is imperative to know what + customers think about your products, or they can also comment to improve their shopping experience + or on your Odoo website! +
+
+ + + +
+
+ +
+

Features

+
+
+
+
+ + The Customers can add comments in the order confirmation page. +
+
+ + Review customer comment in the sale order form view. +
+
+
+ + Enable/ disable the feature from backend. +
+
+ + + +
+
+ +
+

Screenshots +

+ +
+
+
+ +
+

Setting to enable/ disable from backend +

+

You can enable/ disable customer order comment feature from backend. Navigate to + Website/ Configuration/ Settings/ Customer Order Comment and use the enable or disable + the feature using the setting Comment Configuration.

+ +
+ +
+

Add your product to cart

+

+ +
+ +
+

Do process checkout.

+

+ +
+ +
+

Do payment.

+

+ +
+ +
+

Customer can add comment in the order confirmation page.

+

+ +
+ +
+

Review customer comment in the form view of sale order.

+

The comment and rating will get displayed in "Customer Order Comment" tab in the Form View + of the corresponding Sale Order.

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

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/customer_order_comment/static/src/css/review_and_rating.css b/customer_order_comment/static/src/css/review_and_rating.css new file mode 100644 index 000000000..a8ed02817 --- /dev/null +++ b/customer_order_comment/static/src/css/review_and_rating.css @@ -0,0 +1,380 @@ +@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700); +* { + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + +body { + color: #545454; + font-family: "Open Sans", sans-serif; +} + +.wrapper { + margin: 0 auto; + max-width: 960px; + width: 100%; +} + +.master { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + -webkit-box-pack: start; + -ms-flex-pack: start; + justify-content: flex-start; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + padding-top: 40px; +} + +h1 { + font-size: 20px; + margin-bottom: 20px; +} + +h2 { + line-height: 160%; + margin-bottom: 20px; + text-align: center; +} + +.rating-component { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + margin-bottom: 10px; +} + +.rating-component .status-msg { + margin-bottom: 10px; + text-align: center; +} + +.rating-component .status-msg strong { + display: block; + font-weight: bold; + margin-bottom: 10px; +} + +.rating-component .stars-box { + -ms-flex-item-align: center; + align-self: center; + margin-bottom: 15px; +} + +.rating-component .stars-box .star { + color: #ccc; + cursor: pointer; +} + +.rating-component .stars-box .star.hover { + color: #ff5a49; +} + +.rating-component .stars-box .star.selected { + color: #ff5a49; +} + +.feedback-tags { + min-height: 119px; +} + +.feedback-tags .tags-container { + display: none; +} + +.feedback-tags .tags-container .question-tag { + text-align: center; + margin-bottom: 40px; +} + +.feedback-tags .tags-box { + display: -webkit-box; + display: -ms-flexbox; + text-align: center; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; + flex-direction: row; + -ms-flex-wrap: wrap; + flex-wrap: wrap; +} + +.feedback-tags .tags-container .make-compliment { + padding-bottom: 20px; +} + +.feedback-tags .tags-container .make-compliment .compliment-container { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + color: #000; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; +} + +.feedback-tags + .tags-container + .make-compliment + .compliment-container + .fa-smile-wink { + color: #ff5a49; + cursor: pointer; + font-size: 40px; + margin-top: 15px; + -webkit-animation-name: compliment; + animation-name: compliment; + -webkit-animation-duration: 2s; + animation-duration: 2s; + -webkit-animation-iteration-count: 1; + animation-iteration-count: 1; +} + +.feedback-tags + .tags-container + .make-compliment + .compliment-container + .list-of-compliment { + display: none; + margin-top: 15px; +} + +.feedback-tags .tag { + border: 1px solid #ff5a49; + border-radius: 5px; + color: #ff5a49; + cursor: pointer; + margin-bottom: 10px; + margin-left: 10px; + padding: 10px; +} + +.feedback-tags .tag.chosen { + background-color: #ff5a49; + color: #fff; +} + +.list-of-compliment ul { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; + flex-direction: row; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; +} + +.list-of-compliment ul li { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + cursor: pointer; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + margin-bottom: 10px; + margin-left: 20px; + min-width: 90px; +} + +.list-of-compliment ul li:first-child { + margin-left: 0; +} + +.list-of-compliment ul li .icon-compliment { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + border: 2px solid #ff5a49; + border-radius: 50%; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + height: 70px; + margin-bottom: 15px; + overflow: hidden; + padding: 0 10px; + -webkit-transition: 0.5s; + transition: 0.5s; + width: 70px; +} + +.list-of-compliment ul li .icon-compliment i { + color: #ff5a49; + font-size: 30px; + -webkit-transition: 0.5s; + transition: 0.5s; +} + +.list-of-compliment ul li.actived .icon-compliment { + background-color: #ff5a49; + -webkit-transition: 0.5s; + transition: 0.5s; +} + +.list-of-compliment ul li.actived .icon-compliment i { + color: #fff; + -webkit-transition: 0.5s; + transition: 0.5s; +} + +.button-box .done { + background-color: #ff5a49; + border: 1px solid #ff5a49; + border-radius: 3px; + color: #fff; + cursor: pointer; + display: none; + min-width: 100px; + padding: 10px; +} + +.button-box .done:disabled, +.button-box .done[disabled] { + border: 1px solid #ff9b95; + background-color: #ff9b95; + color: #fff; + cursor: initial; +} + +.submitted-box { + display: none; + padding: 20px; +} + +.submitted-box .loader, +.submitted-box .success-message { + display: none; +} + +.submitted-box .loader { + border: 5px solid transparent; + border-top: 5px solid #4dc7b7; + border-bottom: 5px solid #ff5a49; + border-radius: 50%; + width: 60px; + height: 60px; + -webkit-animation: spin 0.8s linear infinite; + animation: spin 0.8s linear infinite; +} + +@-webkit-keyframes compliment { + 1% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + + 25% { + -webkit-transform: rotate(-30deg); + transform: rotate(-30deg); + } + + 50% { + -webkit-transform: rotate(30deg); + transform: rotate(30deg); + } + + 75% { + -webkit-transform: rotate(-30deg); + transform: rotate(-30deg); + } + + 100% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } +} + +@keyframes compliment { + 1% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + + 25% { + -webkit-transform: rotate(-30deg); + transform: rotate(-30deg); + } + + 50% { + -webkit-transform: rotate(30deg); + transform: rotate(30deg); + } + + 75% { + -webkit-transform: rotate(-30deg); + transform: rotate(-30deg); + } + + 100% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } +} + +@-webkit-keyframes spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +@keyframes spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} diff --git a/customer_order_comment/static/src/js/review_and_rating.js b/customer_order_comment/static/src/js/review_and_rating.js new file mode 100644 index 000000000..fbb0e7e42 --- /dev/null +++ b/customer_order_comment/static/src/js/review_and_rating.js @@ -0,0 +1,83 @@ +odoo.define('customer_order_comment.review_and_rating', function(require){ + 'use strict'; + + /** + * The methods defined here are used for adding the comments and rating at + * the time of confirmation of orders and different styles were applied at + * the time of occurrence of some events like button click, mouseout etc. + */ + + $(".rating-component .star").on("mouseover", function () { + var onStar = parseInt($(this).data("value"), 10); + $(this).parent().children("i.star").each(function (e) { + if (e < onStar) { + $(this).addClass("hover"); + } else { + $(this).removeClass("hover"); + } + }); + + }).on("mouseout", function () { + $(this).parent().children("i.star").each(function (e) { + $(this).removeClass("hover"); + }); + }); + + $(".rating-component .stars-box .star").on("click", function () { + var onStar = parseInt($(this).data("value"), 10); + var stars = $(this).parent().children("i.star"); + var ratingMessage = $(this).data("message"); + $('#order_id').val($('.monetary_field').data('oe-id')) + var msg = onStar; + $('.rating-component .star-rate .rate-value').val(msg); + $(".fa-smile-wink").show(); + $(".button-box .done").show(); + if (onStar === 5) { + $(".button-box .done").removeAttr("disabled"); + } else { + $(".button-box .done").attr("disabled", "true"); + } + for (var i = 0; i < stars.length; i++) { + $(stars[i]).removeClass("selected"); + } + for (var i = 0; i < onStar; i++) { + $(stars[i]).addClass("selected"); + } + $(".status-msg .rating_msg").val(ratingMessage); + $(".status-msg").html(ratingMessage); + $("[data-tag-set]").hide(); + $("[data-tag-set=" + onStar + "]").show(); + }); + + $(".feedback-tags ").on("click", function () { + var chosenTagsLength = $(this).parent("div.tags-box").find("input").length + 1; + if ($(this).hasClass("chosen")) { + $(this).removeClass("chosen"); + chosenTagsLength = chosenTagsLength - 2; + } else { + $(this).addClass("chosen"); + $(".button-box .done").removeAttr("disabled"); + } + if (chosenTagsLength <= 0) { + $(".button-box .done").attr("enabled", "false"); + } + }); + + $(".compliment-container .fa-smile-wink").on("click", function () { + $(this).fadeOut("slow", function () { + $(".list-of-compliment").fadeIn(); + }); + }); + + $(".done").on("click", function () { + $(".rating-component").hide(); + $(".feedback-tags").hide(); + $(".button-box").hide(); + $(".submitted-box").show(); + $(".submitted-box .loader").show(); + setTimeout(function () { + $(".submitted-box .loader").hide(); + $(".submitted-box .success-message").show(); + }, 1500); + }); +}); \ No newline at end of file diff --git a/customer_order_comment/views/customer_order_comment_templates.xml b/customer_order_comment/views/customer_order_comment_templates.xml new file mode 100644 index 000000000..a9dd4d6a8 --- /dev/null +++ b/customer_order_comment/views/customer_order_comment_templates.xml @@ -0,0 +1,93 @@ + + + + + + + \ No newline at end of file diff --git a/customer_order_comment/views/res_config_settings_views.xml b/customer_order_comment/views/res_config_settings_views.xml new file mode 100644 index 000000000..6ec2ddb42 --- /dev/null +++ b/customer_order_comment/views/res_config_settings_views.xml @@ -0,0 +1,30 @@ + + + + + + res.config.settings.view.form.inherit.customer.order.comment + res.config.settings + + + + +

Customer Order Comment

+
+
+
+ +
+
+
+
+
+
+
+
+ +
\ No newline at end of file diff --git a/customer_order_comment/views/sale_order_views.xml b/customer_order_comment/views/sale_order_views.xml new file mode 100644 index 000000000..e3b4062fd --- /dev/null +++ b/customer_order_comment/views/sale_order_views.xml @@ -0,0 +1,23 @@ + + + + + + sale.order.form.inherit.customer.order.comment + sale.order + + + + + + + + + + + + + + + + \ No newline at end of file