diff --git a/document_page/README.rst b/document_page/README.rst index 311873a77e0..884ce450891 100644 --- a/document_page/README.rst +++ b/document_page/README.rst @@ -94,6 +94,10 @@ Trobz * Ángel García de la Chica Herrera +* `NuoBiT Solutions SL `__: + + * Deniz Gallo + Other credits ~~~~~~~~~~~~~ diff --git a/document_page/models/document_page.py b/document_page/models/document_page.py index a007ea21ba3..e7e086e130e 100644 --- a/document_page/models/document_page.py +++ b/document_page/models/document_page.py @@ -1,4 +1,5 @@ # Copyright (C) 2004-2010 Tiny SPRL (). +# Copyright 2026 NuoBiT Solutions SL - Deniz Gallo # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import _, api, fields, models @@ -198,3 +199,15 @@ def copy(self, default=None): draft_summary=_("summary"), ) return super(DocumentPage, self).copy(default=default) + + def action_view_children(self): + self.ensure_one() + action = self.env["ir.actions.act_window"]._for_xml_id( + "document_page.action_browse_all_content" + ) + action["context"] = { + "default_type": "content", + "search_default_parent_id": [self.id], + } + action["display_name"] = self.name + return action diff --git a/document_page/readme/CONTRIBUTORS.rst b/document_page/readme/CONTRIBUTORS.rst index a45e3a717c2..e26075cd209 100644 --- a/document_page/readme/CONTRIBUTORS.rst +++ b/document_page/readme/CONTRIBUTORS.rst @@ -16,3 +16,7 @@ Trobz * `Sygel `_: * Ángel García de la Chica Herrera + +* `NuoBiT Solutions SL `__: + + * Deniz Gallo diff --git a/document_page/static/description/index.html b/document_page/static/description/index.html index bcc05dacfca..7ce8c02ee0b 100644 --- a/document_page/static/description/index.html +++ b/document_page/static/description/index.html @@ -8,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -274,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -300,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -441,6 +442,10 @@

Contributors

  • Ángel García de la Chica Herrera
  • +
  • NuoBiT Solutions SL: +
  • @@ -455,7 +460,9 @@

    Other credits

    Maintainers

    This module is maintained by the OCA.

    -Odoo Community Association + +Odoo Community Association +

    OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

    diff --git a/document_page/tests/test_document_page.py b/document_page/tests/test_document_page.py index 9abcf28b49b..57f6eb316d7 100644 --- a/document_page/tests/test_document_page.py +++ b/document_page/tests/test_document_page.py @@ -1,3 +1,4 @@ +# Copyright 2026 NuoBiT Solutions SL - Deniz Gallo # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo.tests import common @@ -67,3 +68,15 @@ def test_page_copy(self): self.assertEqual(page_copy.content, page.content) self.assertEqual(page_copy.draft_name, "1.0") self.assertEqual(page_copy.draft_summary, "summary") + + def test_category_view_children(self): + action = self.category1.action_view_children() + self.assertEqual(action["xml_id"], "document_page.action_browse_all_content") + self.assertEqual(action["display_name"], self.category1.name) + self.assertEqual( + action["context"], + { + "default_type": "content", + "search_default_parent_id": [self.category1.id], + }, + ) diff --git a/document_page/views/document_page_category.xml b/document_page/views/document_page_category.xml index 145881cd7e4..8a051910253 100644 --- a/document_page/views/document_page_category.xml +++ b/document_page/views/document_page_category.xml @@ -1,4 +1,6 @@ + @@ -216,8 +218,8 @@ >