Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][MIG] document_page_group: Migration to 17.0 #489

Merged
merged 30 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7196d95
[ADD] document_page_group
etobella Nov 29, 2019
2cb51ee
Added translation using Weblate (Spanish)
etobella Jan 15, 2020
9f3c846
Translated using Weblate (Spanish)
etobella Jan 15, 2020
05bc381
[12.0][MIG] document_page_group
Mar 2, 2020
3721cbb
Added translation using Weblate (Slovenian)
sysadminmatmoz Mar 21, 2020
02bc895
Translated using Weblate (Slovenian)
sysadminmatmoz Mar 21, 2020
9bee0b5
[IMP] document_page_group: black, isort, prettier
Sep 30, 2020
9b58f9b
[13.0][MIG] document_page_group
Sep 30, 2020
bb94253
[MIG] document_page_group: Migration to 14.0
Du-ma Oct 13, 2021
89b4282
[MIG] document_page_group: Migration to 15.0
olgamarcocb May 18, 2022
03b1e07
[UPD] Update document_page_group.pot
Jun 22, 2022
2a61268
[UPD] README.rst
OCA-git-bot Jun 22, 2022
17e6bc4
[FIX] dp_group: fixed logs spamming field error
gabriel-grinspan Nov 28, 2022
60d2457
document_page_group 15.0.1.0.1
OCA-git-bot Nov 28, 2022
4829d72
[16.0][MIG] document_page_group: Migration to 16.0
FernandoRomera Dec 8, 2022
459f318
[UPD] Update document_page_group.pot
Dec 9, 2022
d4abac4
[UPD] README.rst
OCA-git-bot Dec 9, 2022
aa4c58e
Update translation files
weblate Dec 9, 2022
71b6260
Added translation using Weblate (Italian)
mymage Dec 28, 2022
7a9f7a5
Translated using Weblate (Italian)
mymage Dec 28, 2022
6fcd908
Added translation using Weblate (Croatian)
badbole Feb 13, 2023
9c0e32e
Translated using Weblate (Croatian)
badbole Feb 13, 2023
24bbab7
Translated using Weblate (Italian)
mymage Jun 23, 2023
a00d5a3
[UPD] README.rst
OCA-git-bot Sep 3, 2023
0c2aa47
Updated from template
ivs-cetmix Nov 6, 2023
4ecb820
[BOT] post-merge updates
OCA-git-bot Nov 6, 2023
a2fdf75
Added translation using Weblate (Portuguese)
peterromao Feb 28, 2024
35bb618
Translated using Weblate (Portuguese)
peterromao Feb 28, 2024
05ea367
[IMP] document_page_group: pre-commit auto fixes
peluko00 Jun 18, 2024
0d0d164
[MIG] document_page_group: Migration to 17.0
peluko00 Jun 18, 2024
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
79 changes: 79 additions & 0 deletions document_page_group/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
===================
Document Page Group
===================

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

.. |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/licence-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/17.0/document_page_group
:alt: OCA/knowledge
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/knowledge-17-0/knowledge-17-0-document_page_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=17.0
:alt: Try me on Runboat

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

This module allows to define groups on a category.

**Table of contents**

.. contents::
:local:

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_group%0Aversion:%2017.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
-------

* Creu Blanca

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

- Enric Tobella <[email protected]>
- [APSL-Nagarro](https://apsl.tech):

- Antoni Marroig <[email protected]>

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/17.0/document_page_group>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions document_page_group/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
14 changes: 14 additions & 0 deletions document_page_group/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Document Page Group",
"summary": """
Define access groups on documents""",
"version": "17.0.1.0.0",
"license": "AGPL-3",
"author": "Creu Blanca,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/knowledge",
"depends": ["document_page"],
"data": ["security/document_page_security.xml", "views/document_page.xml"],
}
34 changes: 34 additions & 0 deletions document_page_group/i18n/document_page_group.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * document_page_group
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.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_group
#: model:ir.model,name:document_page_group.model_document_page
msgid "Document Page"
msgstr ""

#. module: document_page_group
#: model:ir.model.fields,field_description:document_page_group.field_document_page__group_ids
msgid "Group"
msgstr ""

#. module: document_page_group
#: model:ir.model.fields,help:document_page_group.field_document_page__direct_group_ids
msgid "Set the groups that can view this category and its childs"
msgstr ""

#. module: document_page_group
#: model:ir.model.fields,field_description:document_page_group.field_document_page__direct_group_ids
msgid "Visible to"
msgstr ""
37 changes: 37 additions & 0 deletions document_page_group/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * document_page_group
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-01-15 16:23+0000\n"
"Last-Translator: Enric Tobella <[email protected]>\n"
"Language-Team: none\n"
"Language: es\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 3.10\n"

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

#. module: document_page_group
#: model:ir.model.fields,field_description:document_page_group.field_document_page__group_ids
msgid "Group"
msgstr "Grupo"

#. module: document_page_group
#: model:ir.model.fields,help:document_page_group.field_document_page__direct_group_ids
msgid "Set the groups that can view this category and its childs"
msgstr "Definir los grupos que puede ver una categoría y sus hijos"

#. module: document_page_group
#: model:ir.model.fields,field_description:document_page_group.field_document_page__direct_group_ids
msgid "Visible to"
msgstr "Visible para"
38 changes: 38 additions & 0 deletions document_page_group/i18n/hr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * document_page_group
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-02-13 13:23+0000\n"
"Last-Translator: Bole <[email protected]>\n"
"Language-Team: none\n"
"Language: hr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 4.14.1\n"

#. module: document_page_group
#: model:ir.model,name:document_page_group.model_document_page
msgid "Document Page"
msgstr "Stranica dokumenta"

#. module: document_page_group
#: model:ir.model.fields,field_description:document_page_group.field_document_page__group_ids
msgid "Group"
msgstr "Grupa"

#. module: document_page_group
#: model:ir.model.fields,help:document_page_group.field_document_page__direct_group_ids
msgid "Set the groups that can view this category and its childs"
msgstr "Postavite grupe koje mogu vidjeti ovu kategoriju i njoj podređene"

#. module: document_page_group
#: model:ir.model.fields,field_description:document_page_group.field_document_page__direct_group_ids
msgid "Visible to"
msgstr "Vidljivo za"
37 changes: 37 additions & 0 deletions document_page_group/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * document_page_group
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-06-23 09:09+0000\n"
"Last-Translator: mymage <[email protected]>\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 4.17\n"

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

#. module: document_page_group
#: model:ir.model.fields,field_description:document_page_group.field_document_page__group_ids
msgid "Group"
msgstr "Gruppo"

#. module: document_page_group
#: model:ir.model.fields,help:document_page_group.field_document_page__direct_group_ids
msgid "Set the groups that can view this category and its childs"
msgstr "Imposta i gruppi che possono visualizzare questa categoria e le figlie"

#. module: document_page_group
#: model:ir.model.fields,field_description:document_page_group.field_document_page__direct_group_ids
msgid "Visible to"
msgstr "Visibile a"
37 changes: 37 additions & 0 deletions document_page_group/i18n/pt.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * document_page_group
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-02-28 21:33+0000\n"
"Last-Translator: Peter Romão <[email protected]>\n"
"Language-Team: none\n"
"Language: pt\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 4.17\n"

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

#. module: document_page_group
#: model:ir.model.fields,field_description:document_page_group.field_document_page__group_ids
msgid "Group"
msgstr "Grupo"

#. module: document_page_group
#: model:ir.model.fields,help:document_page_group.field_document_page__direct_group_ids
msgid "Set the groups that can view this category and its childs"
msgstr "Definir os grupos que podem exibir esta categoria e seus descendentes"

#. module: document_page_group
#: model:ir.model.fields,field_description:document_page_group.field_document_page__direct_group_ids
msgid "Visible to"
msgstr "Visível para"
38 changes: 38 additions & 0 deletions document_page_group/i18n/sl.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * document_page_group
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-03-21 11:13+0000\n"
"Last-Translator: Matjaz Mozetic <[email protected]>\n"
"Language-Team: none\n"
"Language: sl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
"%100==4 ? 2 : 3;\n"
"X-Generator: Weblate 3.10\n"

#. module: document_page_group
#: model:ir.model,name:document_page_group.model_document_page
msgid "Document Page"
msgstr "Stran dokumenta"

#. module: document_page_group
#: model:ir.model.fields,field_description:document_page_group.field_document_page__group_ids
msgid "Group"
msgstr "Skupina"

#. module: document_page_group
#: model:ir.model.fields,help:document_page_group.field_document_page__direct_group_ids
msgid "Set the groups that can view this category and its childs"
msgstr "Nastavi skupine z vpogledom v to kategorijo in njej podrejenim"

#. module: document_page_group
#: model:ir.model.fields,field_description:document_page_group.field_document_page__direct_group_ids
msgid "Visible to"
msgstr "Vidno za"
1 change: 1 addition & 0 deletions document_page_group/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import document_page
34 changes: 34 additions & 0 deletions document_page_group/models/document_page.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import api, fields, models


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

group_ids = fields.Many2many(
"res.groups",
store=True,
recursive=True,
relation="document_page_direct_group",
column1="document_page_id",
column2="group_id",
compute="_compute_group_ids",
)
direct_group_ids = fields.Many2many(
"res.groups",
string="Visible to",
help="Set the groups that can view this category and its childs",
relation="document_page_group",
column1="document_page_id",
column2="group_id",
)

@api.depends("direct_group_ids", "parent_id", "parent_id.group_ids")
def _compute_group_ids(self):
for record in self:
groups = record.direct_group_ids
if record.parent_id:
groups |= record.parent_id.group_ids
record.group_ids = groups
3 changes: 3 additions & 0 deletions document_page_group/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
3 changes: 3 additions & 0 deletions document_page_group/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Enric Tobella \<<[email protected]>\>
- \[APSL-Nagarro\](<https://apsl.tech>):
- Antoni Marroig \<<[email protected]>\>
1 change: 1 addition & 0 deletions document_page_group/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module allows to define groups on a category.
11 changes: 11 additions & 0 deletions document_page_group/security/document_page_security.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record model="ir.rule" id="document_page_groups_rule">
<field name="name">document_page groups</field>
<field name="model_id" ref="model_document_page" />
<field name="global" eval="True" />
<field
name="domain_force"
>['|','&amp;',('type', '=', 'content'),'|','|',('parent_id', '=', False), ('parent_id.group_ids','=',False),('parent_id.group_ids.users','=',user.id), '&amp;', ('type', '=', 'category'), '|', ('group_ids', '=', False), ('group_ids.users', '=', user.id)]</field>
</record>
</odoo>
Binary file added document_page_group/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading