summaryrefslogtreecommitdiff
path: root/addons/website_slides/models
diff options
context:
space:
mode:
authorRomain Derie <rde@odoo.com>2019-05-14 11:17:45 +0000
committerRomain Derie <rde@odoo.com>2019-05-14 11:17:45 +0000
commitc3a81c6c7eebe1c2a42d01ac35f541cefd2c8f0d (patch)
treeae6ea1c8476de669ede2ae67fb39a70481590ee2 /addons/website_slides/models
parentc92b0ce3036dde24b638bb3fb5dd89d7afbd759f (diff)
[FIX] website_forum, website_slides: correctly check if is admin
Before this commit and since 2f7c03d9ca580, the admin user has not ID=1 anymore. Thus, some old condition were not doing what they were expected to. Firstly, the admin was not considered as such on the forum, and if its karma points were not high enough, it would not be possible to do anything for the admin. Note that it was fixed in saas-12.1 with 1dac4131300 Secondly, some _search functions would not return a truthy value anymore. closes odoo/odoo#33359 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Diffstat (limited to 'addons/website_slides/models')
-rw-r--r--addons/website_slides/models/slides.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/website_slides/models/slides.py b/addons/website_slides/models/slides.py
index ab8494d1212..0261d04725d 100644
--- a/addons/website_slides/models/slides.py
+++ b/addons/website_slides/models/slides.py
@@ -121,7 +121,8 @@ class Channel(models.Model):
if not value:
operator = operator == "=" and '!=' or '='
- if self._uid == SUPERUSER_ID:
+ # Won't impact sitemap, search() in converter is forced as public user
+ if self.env.user._is_admin():
return [(1, '=', 1)]
# Better perfs to split request and use inner join that left join