summaryrefslogtreecommitdiff
path: root/addons/website_rating_project_issue
diff options
context:
space:
mode:
Diffstat (limited to 'addons/website_rating_project_issue')
-rw-r--r--addons/website_rating_project_issue/controllers/main.py4
-rw-r--r--addons/website_rating_project_issue/views/project_project_view.xml2
2 files changed, 3 insertions, 3 deletions
diff --git a/addons/website_rating_project_issue/controllers/main.py b/addons/website_rating_project_issue/controllers/main.py
index ceae1822438..c46e32a6b0a 100644
--- a/addons/website_rating_project_issue/controllers/main.py
+++ b/addons/website_rating_project_issue/controllers/main.py
@@ -10,7 +10,7 @@ class WebsiteRatingProject(http.Controller):
@http.route(['/project/rating/'], type='http', auth="public", website=True)
def index(self, **kw):
- projects = request.env['project.project'].sudo().search([('rating_status', '!=', False), ('website_published', '=', True)])
+ projects = request.env['project.project'].sudo().search([('rating_status', '!=', 'no'), ('website_published', '=', True)])
values = {'projects': projects}
return request.website.render('website_rating_project_issue.index', values)
@@ -20,7 +20,7 @@ class WebsiteRatingProject(http.Controller):
project = request.env['project.project'].sudo().browse(project_id)
# to avoid giving any access rights on projects to the public user, let's use sudo
# and check if the user should be able to view the project (project managers only if it's unpublished or has no rating)
- if not (project.rating_status and project.website_published) and not user.sudo(user).has_group('project.group_project_manager'):
+ if not ((project.rating_status<>'no') and project.website_published) and not user.sudo(user).has_group('project.group_project_manager'):
raise NotFound()
values = {
'project': project,
diff --git a/addons/website_rating_project_issue/views/project_project_view.xml b/addons/website_rating_project_issue/views/project_project_view.xml
index dd25a692404..35ccd97acaa 100644
--- a/addons/website_rating_project_issue/views/project_project_view.xml
+++ b/addons/website_rating_project_issue/views/project_project_view.xml
@@ -6,7 +6,7 @@
<field name="arch" type="xml">
<xpath expr='//div[@name="button_box"]/*[1]' position='before'>
<button class="oe_stat_button" name="website_publish_button"
- type="object" icon="fa-globe" attrs="{'invisible': [('rating_status', '=', False)]}">
+ type="object" icon="fa-globe" attrs="{'invisible': [('rating_status', '=', 'no')]}">
<field name="website_published" widget="website_button"/>
</button>
</xpath>