diff options
Diffstat (limited to 'addons/website_rating/controllers/website_mail.py')
| -rw-r--r-- | addons/website_rating/controllers/website_mail.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/addons/website_rating/controllers/website_mail.py b/addons/website_rating/controllers/website_mail.py index 4487307effd..26c0f4dedfa 100644 --- a/addons/website_rating/controllers/website_mail.py +++ b/addons/website_rating/controllers/website_mail.py @@ -1,19 +1,17 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -from werkzeug.exceptions import NotFound - from odoo import http from odoo.http import request -from odoo.addons.website_mail.controllers.main import WebsiteMail +from odoo.addons.portal.controllers.mail import PortalChatter -class WebsiteRating(WebsiteMail): +class WebsiteRating(PortalChatter): @http.route() - def website_chatter_init(self, res_model, res_id, domain=False, limit=False, **kwargs): - result = super(WebsiteRating, self).website_chatter_init(res_model, res_id, domain=domain, limit=limit, **kwargs) + def portal_chatter_init(self, res_model, res_id, domain=False, limit=False, **kwargs): + result = super(WebsiteRating, self).portal_chatter_init(res_model, res_id, domain=domain, limit=limit, **kwargs) # get the rating statistics about the record if kwargs.get('rating_include'): record = request.env[res_model].browse(res_id) @@ -22,10 +20,10 @@ class WebsiteRating(WebsiteMail): return result @http.route() - def website_message_fetch(self, res_model, res_id, domain=False, limit=False, offset=False, **kw): - # add 'rating_include' in context, to fetch them in website_message_format + def portal_message_fetch(self, res_model, res_id, domain=False, limit=False, offset=False, **kw): + # add 'rating_include' in context, to fetch them in portal_message_format if kw.get('rating_include'): context = dict(request.context) context['rating_include'] = True request.context = context - return super(WebsiteRating, self).website_message_fetch(res_model, res_id, domain=domain, limit=limit, offset=offset, **kw) + return super(WebsiteRating, self).portal_message_fetch(res_model, res_id, domain=domain, limit=limit, offset=offset, **kw) |
