diff --git a/addons/project/data/project_mail_template_data.xml b/addons/project/data/project_mail_template_data.xml index 6a9fb6377e9..26aea632b51 100644 --- a/addons/project/data/project_mail_template_data.xml +++ b/addons/project/data/project_mail_template_data.xml @@ -36,7 +36,7 @@
|
- Hello ${partner.name}, + Hello ${partner.name}, Please take a moment to rate our services related to the task "${object.name}" % if object.rating_get_rated_partner_id().name: assigned to ${object.rating_get_rated_partner_id().name}. diff --git a/addons/rating/__manifest__.py b/addons/rating/__manifest__.py index fc85f6a91af..db4e37c8609 100644 --- a/addons/rating/__manifest__.py +++ b/addons/rating/__manifest__.py @@ -12,6 +12,7 @@ This module allows a customer to give rating. 'data': [ 'views/rating_view.xml', 'views/rating_template.xml', + 'views/assets.xml', 'security/ir.model.access.csv' ], 'installable': True, diff --git a/addons/rating/controllers/main.py b/addons/rating/controllers/main.py index 7cbeeb85c72..5257073ce7b 100644 --- a/addons/rating/controllers/main.py +++ b/addons/rating/controllers/main.py @@ -1,8 +1,6 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -import werkzeug - from odoo import http from odoo.http import request from odoo.tools.translate import _ @@ -18,19 +16,21 @@ class Rating(http.Controller): if not rating: return request.not_found() rate_names = { + 10: _("satisfied"), 5: _("not satisfied"), - 1: _("highly dissatisfied"), - 10: _("satisfied") + 1: _("highly dissatisfied") } rating.write({'rating': rate, 'consumed': True}) lang = rating.partner_id.lang or get_lang(request.env).code return request.env['ir.ui.view'].with_context(lang=lang).render_template('rating.rating_external_page_submit', { 'rating': rating, 'token': token, - 'rate_name': rate_names[rate], 'rate': rate + 'rate_names': rate_names, 'rate': rate }) - @http.route(['/rating/
-
-
+
+
@@ -18,27 +17,30 @@
+
- Thank you, we appreciate your feedback!We appreciate your feedback!
-
- Thanks! We appreciate your feedback.-Your rating has been submitted.-
- |