server-auth icon indicating copy to clipboard operation
server-auth copied to clipboard

[19.0][MIG] impersonate_login: Migration to 19.0

Open tishmen opened this issue 2 months ago • 4 comments

Scope

  • impersonate_login

Depends on

  • None

Summary

  • Migration to Odoo 19.0; tests included. No functional changes beyond compatibility.
  • History preserved via git format-patch --keep-subject from upstream/18.0 and git am -3 --keep onto upstream/19.0.
  • Commit structure kept clean for review:
    • [IMP] pre-commit auto fixes (single commit)
    • [MIG] migration to 19.0 (single commit)

Changes (highlights)

  • Use self.env._ for translations and lazy placeholders where needed.
  • Replace deprecated self._uid with self.env.uid.
  • Adapt mail.thread override to 19.0 signature: _message_compute_author(self, author_id=None, email_from=None).
  • Avoid attribute access on request.session; use session.get("impersonate_from_uid").
  • Security XML: res.groups field renamed to user_ids.
  • Manifest: version bumped to 19.0.1.0.0, website points to 19.0 path.
  • JS: backend user menu integration kept; prettier/eslint auto-fixes applied.
  • Tests: resilient on 19.0 runner (no demo data by default) – create demo user and grant required groups (base.group_user, base.group_partner_manager).

Temporary references

  • None

Pre-commit

  • Ran locally; auto-fixes committed as a single [IMP] commit.

Tests

  • Locally verified with fresh DB using --test-tags "/impersonate_login".
  • CI is expected to run pre-commit and the module tests against Odoo 19 and OCB.

Review

  • Files changed show the result on top of 19.0. For an easier review, consider commit-by-commit: import history (via am) → [IMP] pre-commit → [MIG] migration.

tishmen avatar Oct 10 '25 19:10 tishmen

@legalsylvain Opened a new PR based on the OCA 18.0 → 19.0 migration guidelines: https://github.com/OCA/server-auth/pull/849. It preserves history via format-patch/am from upstream/18.0, with two commits ([IMP] pre-commit auto-fixes, [MIG] migration). Please review commit-by-commit. I am closing the previous PR as this current approach looks good.

tishmen avatar Oct 10 '25 20:10 tishmen

Hi @legalsylvain, sorry for the late response. I’ve resolved the noted issues and pushed the updates. Thanks for the review! Please let me know if you spot anything else.

tishmen avatar Oct 15 '25 08:10 tishmen

All remarks resolved and CI is green. @Kev-Roche @astirpe @mymage mind giving this a second review?

tishmen avatar Oct 15 '25 08:10 tishmen

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

OCA-git-bot avatar Nov 03 '25 09:11 OCA-git-bot