Files
odoo_source/addons/website_knowledge/tests/common.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

31 lines
908 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.knowledge.tests.common import KnowledgeCommonWData
class WKnowledgeCommonWData(KnowledgeCommonWData):
@classmethod
def setUpClass(cls):
super().setUpClass()
# - Playground (workspace, writable)
# - Child1
# - Child2
# - Private (shared)
# - Child1
# - ChildPublished
cls.shared_children += cls.env['knowledge.article'].create([
{'article_member_ids': [
(0, 0, {'partner_id': cls.partner_admin.id,
'permission': 'write',
}),
],
'internal_permission': 'none',
'is_published': True,
'name': 'Private Child1',
'parent_id': cls.article_shared.id,
}
])