[19.0][MIG] users_ldap_groups: Migration to 19.0 - #1000
Open
dinkotom wants to merge 1 commit into
Open
Conversation
dinkotom
force-pushed
the
19.0-mig-users_ldap_groups
branch
from
September 7, 2026 15:41
ddee7b1 to
ba0c3ca
Compare
- res.users._login is an instance method in Odoo 19 (no db argument, no separate cursor) - follow the auth_ldap 19.0 implementation - res.users.groups_id was renamed to group_ids; use fields.Command - auth_ldap renamed the model class CompanyLDAP -> ResCompanyLdap (tests) - res.users.authenticate() no longer takes the database name (tests) - drop the cursor mocking in tests: login now runs in the current cursor - drop guards for falsy return values: in Odoo 19 both res.users._login and res.company.ldap._get_or_create_user raise AccessDenied instead of returning False - simplify the fake LDAP connection in tests (unused stubs) - add python-ldap to the repository requirements.txt Based on the 18.0 migration by Cyril Vinh-Tung (Invitu), OCA#889. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dinkotom
force-pushed
the
19.0-mig-users_ldap_groups
branch
from
September 7, 2026 16:04
ba0c3ca to
439da22
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
users_ldap_groupsto 19.0.Based on the 18.0 migration in #889 by @cvinh (Invitu) — thanks!
Odoo 19 changes handled:
res.users._loginis an instance method (nodbargument, no separate cursor) — follows theauth_ldap19.0 implementationres.users.groups_idrenamed togroup_ids; m2m commands viafields.Commandauth_ldapmodel classCompanyLDAPrenamed toResCompanyLdap(tests)res.users.authenticate()no longer takes the database name (tests); cursor mocking dropped since login runs in the current cursor_()→self.env._()Verified: pre-commit clean (ruff 0.13.0, pylint-odoo mandatory), unit tests pass on a clean odoo:19.0 (
0 failed, 0 error(s) of 4 tests).