Skip to content

[20.0][MIG] impersonate_login - #1063

Open
ntsirintanis wants to merge 30 commits into
OCA:20.0from
Therp:20.0-mig-impersonate_login
Open

ntsirintanis wants to merge 30 commits into
OCA:20.0from
Therp:20.0-mig-impersonate_login

Conversation

@ntsirintanis

@ntsirintanis ntsirintanis commented Nov 9, 2026 •

Copy link
Copy Markdown

Standard migration

@oca-cla-bot

oca-cla-bot Bot commented Nov 9, 2026

Copy link
Copy Markdown

The following commit authors need to sign the Contributor License Agreement:

CLA not signed

@OCA-git-bot OCA-git-bot added mod:impersonate_login Module impersonate_login series:20.0 labels Nov 9, 2026
@ntsirintanis
ntsirintanis force-pushed the 20.0-mig-impersonate_login branch 2 times, most recently from de29009 to 156fd0a Compare November 9, 2026 10:56
@miguel-S73

Copy link
Copy Markdown

Hi @ntsirintanis ,

It looks like Codecov might be stuck or not updating correctly.

Could you please rebase this PR onto the latest 20.0 branch to see if that resolves the issue and triggers a fresh CI run?

Thanks for your work on this migration!

@miguel-S73

Copy link
Copy Markdown

Hi @tishmen,

The OCA CLA bot is currently blocking this PR because of your historical contribution to the impersonate_login module (migration to 19.0).

It specifically flags the commit email [email protected].

Could you please check whether your CLA is signed at https://clabot.odoo-community.org/ and whether that email is still associated with your GitHub account?

If you've already signed the CLA but the bot still reports an issue, we may need help from an OCA maintainer to resolve the author attribution.

Thanks in advance!

oca-ci and others added 8 commits November 24, 2026 12:58
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: server-auth-19.0/server-auth-19.0-impersonate_login
Translate-URL: https://translation.odoo-community.org/projects/server-auth-19-0/server-auth-19-0-impersonate_login/
Currently translated at 100.0% (33 of 33 strings)

Translation: server-auth-19.0/server-auth-19.0-impersonate_login
Translate-URL: https://translation.odoo-community.org/projects/server-auth-19-0/server-auth-19-0-impersonate_login/it/
Automatic fixes from `pre-commit run -a` and also using ruff-odoo:

- Replace the `_()` helper by `self.env._()`, passing the interpolation
  values as arguments instead of applying `%` to the already translated
  string, so the placeholders stay part of the translatable term.
- Drop the resulting unused `_` import.
- Remove the redundant `string=` on `password_history_ids` and `user_id`,
  which repeats the label derived from the field name.
- Remove the unused `logging` import and its `_logger` in the controller.
- Rename the unused `pwd` unpacking to `_pwd` in test_signup.
- Regenerate README.rst and static/description/index.html.

Manual fixes, for what the hooks reported but did not resolve on their own

- models/res_users.py: UP031 on the minimum length regex. Solved with
  string concatenation rather than an f-string: the string is a regex and
  `{n,}` is a quantifier, so an f-string requires `f".{{{n},}}$"`, and
  doubling braces inside a pattern is easy to get wrong. The concatenation
  also matches the four sibling entries of the same list, which already
  build their fragment that way.
- impersonate_login/static/src/js/user_menu.esm.js: move `markup` into
  alphabetical position, as eslint `sort-imports` requires.
The test creates its user with a 4 character password. That is fine for this
module alone, but the OCA CI installs every module of the repository into a
single database, and password_security depends on auth_password_policy_signup,
hence on auth_password_policy, whose data file installs a minimum length of 8:
 - https://github.com/odoo/odoo/blob/13e9e827dc21103052e8607d16f23c07adeb5634/addons/auth_password_policy/data/defaults.xml#L5

so setUpClass fails with:

    UserError: Your password must contain at least 8 characters and only has 4.

Checked with an A/B run: the module is green on its own and red as soon as
password_security shares the database.
@ntsirintanis
ntsirintanis force-pushed the 20.0-mig-impersonate_login branch from 156fd0a to 83de1b4 Compare November 24, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:impersonate_login Module impersonate_login series:20.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.