Repository navigation
[20.0][FIX] base_user_role: preserve role sequence and write values - #1
Closed
pierre-pizzetta wants to merge 1 commit into
Closed
pierre-pizzetta wants to merge 1 commit into
pierre-pizzetta wants to merge 1 commit into
Conversation
Route only inherited fields to the delegated group so updates to the role-owned sequence field apply to the role. Copy write values before separating delegated fields to preserve the caller dictionary. Add regressions for independent role ordering and input preservation.
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.
Changing a role's sequence currently writes the value to its associated group, leaving the role's own sequence unchanged. Writing an inherited field such as
namealso removes that key from the caller's values dictionary.Copy the input values and forward only fields marked as inherited from the delegated group. This preserves the existing delegated-write workaround and keeps role-owned fields on the role.
This PR targets the source branch of OCA#488 so the fixes can be included in the existing Odoo 20 migration.
Validation against migration head
dcf460154a016060d6c3a9e2d37b0af07def484don Odoo 20 corea7950cab13fcb9400d58d582f5583c0f1c0f5405:10instead of42, and the caller dictionary becomes{}.git diff --checkpass. Full pre-commit was not run.Assisted-by: OpenAI Codex