Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3c0d569
[ADD]document_page_access_group: Add access groups to document pages
manuelregidor May 9, 2022
0425921
Added translation using Weblate (Italian)
mymage Dec 28, 2022
3d50d81
Translated using Weblate (Italian)
mymage Dec 28, 2022
9c36104
Added translation using Weblate (Spanish)
luis-ron Jun 5, 2023
08e4258
Translated using Weblate (Spanish)
luis-ron Jun 5, 2023
caeb537
[MIG] document_page_access_group: Migration to 15.0
Tisho99 Mar 28, 2024
b2d77e9
[MIG] document_page_access_group: Migration to 16.0
Tisho99 Mar 28, 2024
ba09975
[IMP] document_page_access_group: pre-commit auto fixes
Tisho99 Mar 28, 2024
e1691fd
[MIG] document_page_access_group: Migration to 17.0
Tisho99 Mar 28, 2024
75c7414
[IMP] document_page_access_group: Users compatibility
victoralmau Jul 23, 2024
c6f9027
Translated using Weblate (Italian)
mymage Aug 7, 2024
a615b96
Added translation using Weblate (Catalan)
esteveblanch Sep 4, 2024
076bb00
Translated using Weblate (Catalan)
esteveblanch Sep 4, 2024
7bfa9f8
[OU-FIX] document_page_access_group: use env in openupgrade load_data…
victoralmau Nov 11, 2024
6b6ba47
[MIG] document_page_access_group: Migration to 18.0
BhaveshHeliconia Feb 17, 2025
f3f71ab
[UPD] Update document_page_access_group.pot
Mar 24, 2025
83f7c59
[BOT] post-merge updates
OCA-git-bot Mar 24, 2025
ae45c2d
[IMP] document_page_access_group: update contributors from document_p…
luisDIXMIT May 13, 2025
40262d7
Added translation using Weblate (Portuguese (Brazil))
marcelsavegnago May 13, 2025
3a5aac2
[BOT] post-merge updates
OCA-git-bot May 13, 2025
7e1abf5
[MIG] document_page_access_group: Migration to 19.0
BhaveshHeliconia Dec 29, 2025
79e95c8
[DON'T MERGE] test-requirements.txt
BhaveshHeliconia Dec 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions document_page_access_group/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

==========================
Document Page Access Group
==========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e8eb8a033737ed252b5c1198683cc7df9f0773817836d80e33e7b76058ba44de
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fknowledge-lightgray.png?logo=github
:target: https://github.com/OCA/knowledge/tree/19.0/document_page_access_group
:alt: OCA/knowledge
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/knowledge-19-0/knowledge-19-0-document_page_access_group
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/knowledge&target_branch=19.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows to select which users groups have access to the
document pages.

**Table of contents**

.. contents::
:local:

Usage
=====

To select the users that have access to a given document page you need
to open a document, go to the 'Security' tab and you have 3 options:

- Select a group: Only users with those groups will be able to see the
page.
- Select any user: Only the selected users will be able to see the page.
- Do not select group or user: All users will be able to see the page.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/knowledge/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/knowledge/issues/new?body=module:%20document_page_access_group%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Sygel
* Creu Blanca

Contributors
------------

- Manuel Regidor <manuel.regidor@sygel.es>
- Alberto Martínez <alberto.martinez@sygel.es>

- ``Tecnativa <https://www.tecnativa.com>``\ \_:

- Víctor Martínez

- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`__

- Bhavesh Heliconia

- `Dixmit <https://www.dixmit.com>`__:

- Enric Tobella

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

This module is part of the `OCA/knowledge <https://github.com/OCA/knowledge/tree/19.0/document_page_access_group>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions document_page_access_group/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2022 Manuel Regidor <manuel.regidor@sygel.es>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
19 changes: 19 additions & 0 deletions document_page_access_group/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2022 Manuel Regidor <manuel.regidor@sygel.es>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Document Page Access Group",
"summary": "Choose groups to access document pages",
"version": "19.0.1.0.0",
"category": "document_knowledge",
"website": "https://github.com/OCA/knowledge",
"author": "Sygel, Creu Blanca, Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": [
"document_page",
"document_knowledge",
],
"data": ["views/document_page.xml", "security/security.xml"],
}
47 changes: 47 additions & 0 deletions document_page_access_group/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * document_page_access_group
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-09-04 18:06+0000\n"
"Last-Translator: Esteve Blanch Sanmartí <3501974+esteveblanch@users.noreply."
"github.com>\n"
"Language-Team: none\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.6.2\n"

#. module: document_page_access_group
#: model:ir.model,name:document_page_access_group.model_document_page
msgid "Document Page"
msgstr "Pàgina del document"

#. module: document_page_access_group
#: model:ir.model.fields,field_description:document_page_access_group.field_document_page__groups_id
#: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form
msgid "Groups"
msgstr "Grups"

#. module: document_page_access_group
#: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form
msgid "Security"
msgstr "Seguretat"

#. module: document_page_access_group
#: model:ir.model.fields,field_description:document_page_access_group.field_document_page__user_ids
#: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form
msgid "Users"
msgstr "Usuaris"

#. module: document_page_access_group
#. odoo-python
#: code:addons/document_page_access_group/models/document_page.py:0
#, python-format
msgid "You cannot set groups and users at the same time."
msgstr "No podeu establir grups i usuaris al mateix temps."
42 changes: 42 additions & 0 deletions document_page_access_group/i18n/document_page_access_group.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * document_page_access_group
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: document_page_access_group
#: model:ir.model,name:document_page_access_group.model_document_page
msgid "Document Page"
msgstr ""

#. module: document_page_access_group
#: model:ir.model.fields,field_description:document_page_access_group.field_document_page__groups_id
#: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form
msgid "Groups"
msgstr ""

#. module: document_page_access_group
#: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form
msgid "Security"
msgstr ""

#. module: document_page_access_group
#: model:ir.model.fields,field_description:document_page_access_group.field_document_page__user_ids
#: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form
msgid "Users"
msgstr ""

#. module: document_page_access_group
#. odoo-python
#: code:addons/document_page_access_group/models/document_page.py:0
msgid "You cannot set groups and users at the same time."
msgstr ""
47 changes: 47 additions & 0 deletions document_page_access_group/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * document_page_access_group
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-07-24 07:09+0000\n"
"PO-Revision-Date: 2024-07-24 09:10+0200\n"
"Last-Translator: luis-ron <luis.ron@sygel.es>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Poedit 3.0.1\n"

#. module: document_page_access_group
#: model:ir.model,name:document_page_access_group.model_document_page
msgid "Document Page"
msgstr "Página de documento"

#. module: document_page_access_group
#: model:ir.model.fields,field_description:document_page_access_group.field_document_page__groups_id
#: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form
msgid "Groups"
msgstr "Grupos"

#. module: document_page_access_group
#: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form
msgid "Security"
msgstr "Seguridad"

#. module: document_page_access_group
#: model:ir.model.fields,field_description:document_page_access_group.field_document_page__user_ids
#: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form
msgid "Users"
msgstr "Usuarios"

#. module: document_page_access_group
#. odoo-python
#: code:addons/document_page_access_group/models/document_page.py:0
#, python-format
msgid "You cannot set groups and users at the same time."
msgstr "No puedes definir grupos y usuarios al mismo tiempo."
55 changes: 55 additions & 0 deletions document_page_access_group/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * document_page_access_group
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-08-07 08:58+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.6.2\n"

#. module: document_page_access_group
#: model:ir.model,name:document_page_access_group.model_document_page
msgid "Document Page"
msgstr "Pagina documento"

#. module: document_page_access_group
#: model:ir.model.fields,field_description:document_page_access_group.field_document_page__groups_id
#: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form
msgid "Groups"
msgstr "Gruppi"

#. module: document_page_access_group
#: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form
msgid "Security"
msgstr "Sicurezza"

#. module: document_page_access_group
#: model:ir.model.fields,field_description:document_page_access_group.field_document_page__user_ids
#: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form
msgid "Users"
msgstr "Utenti"

#. module: document_page_access_group
#. odoo-python
#: code:addons/document_page_access_group/models/document_page.py:0
#, python-format
msgid "You cannot set groups and users at the same time."
msgstr "Non si possono impostare gruppi e utenti allo stesso tempo."

#~ msgid "Display Name"
#~ msgstr "Nome visualizzato"

#~ msgid "ID"
#~ msgstr "ID"

#~ msgid "Last Modified on"
#~ msgstr "Ultima modifica il"
43 changes: 43 additions & 0 deletions document_page_access_group/i18n/pt_BR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * document_page_access_group
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"

#. module: document_page_access_group
#: model:ir.model,name:document_page_access_group.model_document_page
msgid "Document Page"
msgstr ""

#. module: document_page_access_group
#: model:ir.model.fields,field_description:document_page_access_group.field_document_page__groups_id
#: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form
msgid "Groups"
msgstr ""

#. module: document_page_access_group
#: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form
msgid "Security"
msgstr ""

#. module: document_page_access_group
#: model:ir.model.fields,field_description:document_page_access_group.field_document_page__user_ids
#: model_terms:ir.ui.view,arch_db:document_page_access_group.document_page_access_group_view_wiki_form
msgid "Users"
msgstr ""

#. module: document_page_access_group
#. odoo-python
#: code:addons/document_page_access_group/models/document_page.py:0
msgid "You cannot set groups and users at the same time."
msgstr ""
4 changes: 4 additions & 0 deletions document_page_access_group/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2022 Manuel Regidor <manuel.regidor@sygel.es>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import document_page
21 changes: 21 additions & 0 deletions document_page_access_group/models/document_page.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2022 Manuel Regidor <manuel.regidor@sygel.es>
# Copyright 2024 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import api, fields, models
from odoo.exceptions import UserError


class DocumentPage(models.Model):
_inherit = "document.page"

groups_id = fields.Many2many(comodel_name="res.groups", string="Groups")
user_ids = fields.Many2many(comodel_name="res.users", string="Users")

@api.constrains("groups_id", "user_ids")
def check_document_page_groups_users(self):
for _item in self.filtered(lambda x: x.groups_id and x.user_ids):
raise UserError(
self.env._("You cannot set groups and users at the same time.")
)
return True
Loading
Loading