Files
odoo_source/addons/website_project/models/project.py
T
Benjamin Frantzen (bfr) e4a4ffb974 [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
2020-05-08 12:17:20 +00:00

24 lines
777 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class Project(models.Model):
_name = 'project.project'
_inherit = ['project.project', 'website.published.mixin']
def action_view_all_rating(self):
if self.website_published:
return self.open_website_url()
return super(Project, self).action_view_all_rating()
def open_website_url(self):
""" return the action to see all the rating of the project, and activate default filters """
return {
'type': 'ir.actions.act_url',
'name': "Redirect to the Website Project Rating Page",
'target': 'self',
'url': "/project/rating/%s" % (self.id)
}