[MIG] document_page_group: Migration to 17.0

This commit is contained in:
Antoni Marroig Campomar 2024-06-18 15:48:32 +02:00
parent 05ea367f89
commit 0d0d164402
5 changed files with 21 additions and 11 deletions

View File

@ -57,6 +57,9 @@ Contributors
------------ ------------
- Enric Tobella <etobella@creublanca.es> - Enric Tobella <etobella@creublanca.es>
- [APSL-Nagarro](https://apsl.tech):
- Antoni Marroig <amarroig@apsl.net>
Maintainers Maintainers
----------- -----------

View File

@ -5,7 +5,7 @@
"name": "Document Page Group", "name": "Document Page Group",
"summary": """ "summary": """
Define access groups on documents""", Define access groups on documents""",
"version": "16.0.1.0.1", "version": "17.0.1.0.0",
"license": "AGPL-3", "license": "AGPL-3",
"author": "Creu Blanca,Odoo Community Association (OCA)", "author": "Creu Blanca,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/knowledge", "website": "https://github.com/OCA/knowledge",

View File

@ -1 +1,3 @@
- Enric Tobella \<<etobella@creublanca.es>\> - Enric Tobella \<<etobella@creublanca.es>\>
- \[APSL-Nagarro\](<https://apsl.tech>):
- Antoni Marroig \<<amarroig@apsl.net>\>

View File

@ -402,6 +402,10 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
<h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2> <h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
<ul class="simple"> <ul class="simple">
<li>Enric Tobella &lt;<a class="reference external" href="mailto:etobella&#64;creublanca.es">etobella&#64;creublanca.es</a>&gt;</li> <li>Enric Tobella &lt;<a class="reference external" href="mailto:etobella&#64;creublanca.es">etobella&#64;creublanca.es</a>&gt;</li>
<li>[APSL-Nagarro](<a class="reference external" href="https://apsl.tech">https://apsl.tech</a>):<ul>
<li>Antoni Marroig &lt;<a class="reference external" href="mailto:amarroig&#64;apsl.net">amarroig&#64;apsl.net</a>&gt;</li>
</ul>
</li>
</ul> </ul>
</div> </div>
<div class="section" id="maintainers"> <div class="section" id="maintainers">

View File

@ -5,10 +5,11 @@ from odoo.tests.common import TransactionCase
class TestDocumentPageGroup(TransactionCase): class TestDocumentPageGroup(TransactionCase):
def setUp(self): @classmethod
super().setUp() def setUpClass(cls):
knowledge_group = self.browse_ref("document_knowledge.group_document_user").id super().setUpClass()
self.user_id = self.env["res.users"].create( knowledge_group = cls.env.ref("document_knowledge.group_document_user").id
cls.user_id = cls.env["res.users"].create(
{ {
"name": "user", "name": "user",
"login": "login", "login": "login",
@ -16,16 +17,16 @@ class TestDocumentPageGroup(TransactionCase):
"groups_id": [(4, knowledge_group)], "groups_id": [(4, knowledge_group)],
} }
) )
self.group = self.browse_ref("document_page.group_document_manager") cls.group = cls.env.ref("document_page.group_document_manager")
self.categ_1 = self.env["document.page"].create( cls.categ_1 = cls.env["document.page"].create(
{"name": "Categ 1", "type": "category"} {"name": "Categ 1", "type": "category"}
) )
self.categ_2 = self.env["document.page"].create( cls.categ_2 = cls.env["document.page"].create(
{"name": "Categ 2", "type": "category", "parent_id": self.categ_1.id} {"name": "Categ 2", "type": "category", "parent_id": cls.categ_1.id}
) )
self.page = self.env["document.page"].create( cls.page = cls.env["document.page"].create(
{"name": "Page 1", "type": "content", "parent_id": self.categ_1.id} {"name": "Page 1", "type": "content", "parent_id": cls.categ_1.id}
) )
def test_document_page_group(self): def test_document_page_group(self):