Files
odoo_source/addons/website_knowledge/models/knowledge_article.py
T
0727bbe8f1 [IMP] website_knowledge: allow public users to access published articles
This commit gives the read access to public users to published articles
(website_published = True).

Task-2674460

Part-of: odoo/odoo#82315
Co-authored-by: Damien Abeloos <abd@odoo.com>
Co-authored-by: Julien Banken <jbn@odoo.com>
Co-authored-by: David Beguin <dbe@odoo.com>
Co-authored-by: Fabio Barbero <faba@odoo.com>
Co-authored-by: Thibault Delavallee <tde@odoo.com>
Co-authored-by: Aurelien Warnong <awa@odoo.com>
2022-05-13 02:58:50 +02:00

18 lines
505 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, models
class Article(models.Model):
_name = 'knowledge.article'
_inherit = ['knowledge.article', 'website.published.mixin']
@api.depends('article_url')
def _compute_website_url(self):
for record in self:
record.website_url = record.article_url
def get_backend_menu_id(self):
return self.env.ref('knowledge.knowledge_menu_root').id