mirror of
https://github.com/OCA/knowledge.git
synced 2025-12-19 11:52:18 -06:00
[13.0][MIG] document_page_group
[UPD] Update document_page_group.pot [UPD] README.rst
This commit is contained in:
committed by
FernandoRomera
parent
0b58c1943c
commit
53e8a292a2
@@ -22,16 +22,16 @@ class TestDocumentPageGroup(TransactionCase):
|
||||
{"name": "Categ 1", "type": "category"}
|
||||
)
|
||||
self.categ_2 = self.env["document.page"].create(
|
||||
{"name": "Categ 2", "type": "category", "parent_id": self.categ_1.id,}
|
||||
{"name": "Categ 2", "type": "category", "parent_id": self.categ_1.id}
|
||||
)
|
||||
self.page = self.env["document.page"].create(
|
||||
{"name": "Page 1", "type": "content", "parent_id": self.categ_1.id,}
|
||||
{"name": "Page 1", "type": "content", "parent_id": self.categ_1.id}
|
||||
)
|
||||
|
||||
def test_document_page_group(self):
|
||||
pages = (
|
||||
self.env["document.page"]
|
||||
.sudo(user=self.user_id.id)
|
||||
.with_user(user=self.user_id.id)
|
||||
.search([("type", "=", "content")])
|
||||
)
|
||||
self.assertIn(self.page.id, pages.ids)
|
||||
@@ -41,7 +41,7 @@ class TestDocumentPageGroup(TransactionCase):
|
||||
|
||||
pages = (
|
||||
self.env["document.page"]
|
||||
.sudo(user=self.user_id.id)
|
||||
.with_user(user=self.user_id.id)
|
||||
.search([("type", "=", "content")])
|
||||
)
|
||||
self.assertNotIn(self.page.id, pages.ids)
|
||||
|
||||
Reference in New Issue
Block a user