[FIX] python call action rights

This commit is contained in:
Chill
2024-03-12 17:12:12 +08:00
parent f50ca7b3de
commit 355958e8f3
9 changed files with 11 additions and 11 deletions

View File

@@ -15,7 +15,7 @@ class BlogBlog(models.Model):
def action_view_blog_post(self):
self.ensure_one()
action = self.env.ref('website_blog.action_blog_post').read()[0]
action = self.env.ref('website_blog.action_blog_post').sudo().read()[0]
action['domain'] = [('blog_id', '=', self.id)]
return action