Repository navigation
[20.0][MIG] document_page_access_group: Migration to 20.0 - #670
Open
bm1-phillip wants to merge 25 commits into
Open
bm1-phillip wants to merge 25 commits into
bm1-phillip wants to merge 25 commits into
Conversation
Currently translated at 100.0% (6 of 6 strings) Translation: knowledge-14.0/knowledge-14.0-document_page_access_group Translate-URL: https://translation.odoo-community.org/projects/knowledge-14-0/knowledge-14-0-document_page_access_group/it/
Currently translated at 100.0% (6 of 6 strings) Translation: knowledge-14.0/knowledge-14.0-document_page_access_group Translate-URL: https://translation.odoo-community.org/projects/knowledge-14-0/knowledge-14-0-document_page_access_group/es/
Currently translated at 100.0% (5 of 5 strings) Translation: knowledge-17.0/knowledge-17.0-document_page_access_group Translate-URL: https://translation.odoo-community.org/projects/knowledge-17-0/knowledge-17-0-document_page_access_group/it/
Currently translated at 100.0% (5 of 5 strings) Translation: knowledge-17.0/knowledge-17.0-document_page_access_group Translate-URL: https://translation.odoo-community.org/projects/knowledge-17-0/knowledge-17-0-document_page_access_group/ca/
… instead of cr As stated in https://github.com/OCA/openupgradelib/blob/master/openupgradelib/openupgrade.py#L297, the param should `env`, instead of the cursor
bm1-phillip
force-pushed
the
20.0-mig-document_page_access_group
branch
from
November 14, 2026 09:01
81474d2 to
74f0efe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migration of
document_page_access_groupto 20.0.This one needs more than the usual changes, because the module relied on group-specific
ir.rulerecords to restrict whatdocument_pagegrants. Withir.access, permissions(records with a group) are OR-ed together, so adding a permission with a domain no longer
restricts anything while the unrestricted permission of
document_pageis active.What the module does now (same pattern as
hr_recruitmentorsale_timesheetin Odoo core):document_page.document_page_useranddocument_page.document_page_editor.domain of the former rule (
security/ir.access.csv).document_page.document_page_manager, so the former"full access" rule is not needed any more.
uninstall_hookenables the two permissions ofdocument_pageagain.security/security.xmlis a noupdate block, which Odoo skips when the records already exist, anddocument_pagecreates them active before this module is updated.Other changes:
_test_user_groups = None, plus a test for the uninstall hook.stringofgroups_id(pylintattribute-string-redundant).The domain itself is unchanged, including
user.group_ids(explicitly assigned groups only).I can follow up with a separate PR if
user.all_group_idsis preferred.Checked on a fresh Odoo 20 database with a reader, an editor and a manager: pages without
groups are visible to everyone, pages with a group only to its members, editors can only
modify what they can read, managers see and edit everything.
Migration issue: #650
🤖 Generated with Claude Code