diff options
| author | Benjamin Frantzen (bfr) <bfr@odoo.com> | 2019-12-18 13:45:38 +0000 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2020-05-08 12:17:20 +0000 |
| commit | e4a4ffb974ccde1842e1b2389450718f8576ad5b (patch) | |
| tree | 6159873058286c65a3a3bfb5a48f2ef5ffbf7565 /addons/rating/controllers/main.py | |
| parent | f427a38c4e0dcd63d086706ad66a3e5570fbf0aa (diff) | |
[IMP] customer ratings flow improvements
- Rename the 'Use Rating on Project' feature into 'Customer Ratings'
- Rename the 'Set Email Template to Stages' link to 'Set a Rating Email Template on Stages'
- Add an optional list view for the Stages menu
- display warning if the rating_template_id field is set and if one of the selected project_ids doesn't have the rating_status field set to true
- Project form view revamp
- rename the '% on tasks' stat button into 'Customer Satisfaction'
- Remove the 'no option' for the rating frequency field because it is required
- project form : Add a 'Go to Website' stat button
- Project dashboard: remove the 'Customer Ratings' menu item in more
- Ratings page: the 'Last 30 days' filter include ratings from today
- remove the Appointment / Helpdesk Customer Satisfaction / Live Support menu items
TASK ID : 1251
Diffstat (limited to 'addons/rating/controllers/main.py')
| -rw-r--r-- | addons/rating/controllers/main.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/rating/controllers/main.py b/addons/rating/controllers/main.py index 5c1f7f5f4ce..e27fc6b7c53 100644 --- a/addons/rating/controllers/main.py +++ b/addons/rating/controllers/main.py @@ -11,13 +11,13 @@ class Rating(http.Controller): @http.route('/rating/<string:token>/<int:rate>', type='http', auth="public", website=True) def open_rating(self, token, rate, **kwargs): - assert rate in (1, 5, 10), "Incorrect rating" + assert rate in (1, 3, 5), "Incorrect rating" rating = request.env['rating.rating'].sudo().search([('access_token', '=', token)]) if not rating: return request.not_found() rate_names = { - 10: _("satisfied"), - 5: _("not satisfied"), + 5: _("satisfied"), + 3: _("not satisfied"), 1: _("highly dissatisfied") } rating.write({'rating': rate, 'consumed': True}) @@ -30,7 +30,7 @@ class Rating(http.Controller): @http.route(['/rating/<string:token>/submit_feedback'], type="http", auth="public", methods=['post'], website=True) def submit_rating(self, token, **kwargs): rate = int(kwargs.get('rate')) - assert rate in (1, 5, 10), "Incorrect rating" + assert rate in (1, 3, 5), "Incorrect rating" rating = request.env['rating.rating'].sudo().search([('access_token', '=', token)]) if not rating: return request.not_found() |
