Skip to content

[MIG] password_security: Migration to 19.0#927

Closed
hailangvn wants to merge 4 commits intoOCA:19.0from
hailangvn:night-shift/migrate-password_security-19.0
Closed

[MIG] password_security: Migration to 19.0#927
hailangvn wants to merge 4 commits intoOCA:19.0from
hailangvn:night-shift/migrate-password_security-19.0

Conversation

@hailangvn
Copy link
Copy Markdown

@hailangvn hailangvn commented Apr 13, 2026

Migrates the password_security module from 18.0 to 19.0.

Changes

  • Updated manifest version to 19.0
  • Updated Python code for Odoo 19 API compatibility
  • Fixed test suite for Odoo 19 test runner changes
  • Updated views and security definitions
  • Generated updated README and static description

JustineBlanchet and others added 4 commits April 13, 2026 10:44
Port from 18.0.1.0.0 to 19.0.1.0.0.

No breaking API changes between Odoo 18 and 19 for this module:
- auth_password_policy, auth_password_policy_signup, auth_totp
  are all available in Odoo 19.0
- ensure_db import path unchanged (web.controllers.home)
- auth_totp Home controller class name unchanged

Migration performed following OCA guidelines.

Made-with: Cursor
- ruff UP031: replace percent format with f-string in _check_password_rules
- ruff-format: collapse set_param calls in test_password_history
- pylint W8301/W8161: replace _() with self.env._() for lazy/env-aware
  translation on all UserError/ValidationError messages in res_users
- Remove unused _ import from odoo (replaced by self.env._)
- Add README.rst required by OCA pylint C8112 (missing-readme)

Made-with: Cursor
- Opener API: Odoo 19 changed Opener(cursor) to Opener(http_case);
  update all HttpCase tests (test_login, test_signup, test_reset_password)
- base.user_demo: CI runs without demo data; replace env.ref("base.user_demo")
  with dynamically created test users in test_res_users and test_totp
- test_02_history_is_limited: add invalidate_recordset() to flush ORM cache
  after _set_encrypted_password creates a new history entry
- test_01_history_is_saved: same cache invalidation fix
- test_03_reset_password_admin: replace reset_password("demo") with
  username from setUp and create a non-admin user dynamically

Made-with: Cursor
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@hailangvn
Copy link
Copy Markdown
Author

hailangvn commented Apr 13, 2026

Closed as the module is migrated.

@hailangvn hailangvn closed this Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants