[20.0][MIG] auth_signup_verify_email: Migration to 20.0 #1064
All Vouch review confidence checks passed
Residual risk 0.39 = Change Risk (0.73) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.73 · 579 lines diff across 7 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.381
Shallow Review Depth
shallow_review_depth
0.344
Sensitive Paths
sensitive_paths
0.073
Real PR Conversation Timeline
1 comments
"Review active on #1064"
general
weight: 0.35
weinni2000
Migration of
auth_signup_verify_emailto 20.0.It carries the 19.0 migration too
The module is not in the 19.0 branch: its migration, #905, is still open, so
this PR is built on top of it. The history here is #905's plus one
[IMP] pre-commit auto fixesand one[MIG] … Migration to 20.0. The OCAmigration guide allows skipping a version when the intermediate guides' tasks
are done, and #905's
[MIG]covers 19.0.If #905 (or #1034, a second 19.0 migration of the same module) is merged first,
this PR should be rebased on it.
What 20.0 needed
ir.config_parameter.set_paramis gone (odoo/odoo@a4f2879697a7), replaced bytyped setters →
set_str.website.get_current_websiteis gone (odoo/odoo@2545a833c8e4). Thereplacement is the
env.websiteproperty, with an explicit fallback, which iswhat core 20.0 does in
website/models/ir_http.py.websitemodel is now declared inbase(
odoo/addons/base/models/website.py), so"website" in self.envno longertells whether the
websitemodule is installed. The test now checks for thefield instead. Without this the two existing tests error with
AttributeError: 'website' object has no attribute 'auth_signup_uninvited'.The default website record moved too:
website.default_website→base.default_website.Fix: the activation page had no password fields
only_passwordswas dropped from core in 19.0, and the module still used it inthe
t-ifof the password fields, so they were hidden on every page thatrenders
auth_signup.fields— including/web/reset_password?token=..., whichis where this module's own activation mail points. Public signup could not be
completed. Details and measurements in
https://github.com/OCA/server-auth/pull/905#issuecomment-6769337032.
The xpaths now use
token and not invalid_token, which is the expression Odoo18 assigned to
only_passwords. Behaviour is back to 18.0: fields shown with atoken, hidden on free signup.
test_activation_page_asks_for_passwordcovers it — it signs up, prepares areset token and asserts the password inputs are on the page. Validated red →
green: without the fix only that test fails.
pre-commit
BLE001andTRY401fire incontrollers/main.pyon this branch..ruff.tomlis identical in 19.0 and 20.0; what changed is the hook bump (ruff
v0.13.0→v0.16.8), and since the config only setsextend-select, ruff'swider default rule set now applies. Fixed in code so the check is green:
TRY401by dropping the redundant exception object (logging.exceptionalreadyattaches it),
BLE001with a# noqa— narrowing theexcept Exceptionwouldchange behaviour, since an unexpected error would stop being rendered as a form
error. If OCA/oca-addons-repo-template#372 lands and the repo is updated, both
rules stop applying and the
# noqacan go.Review changes
Folded into the
[MIG]commit:label[@for='password'], since in 20.0auth_signup.fieldsnests a seconddiv.field-passwordinsidediv.field-confirm_password.signup_login_fieldsis removed: core 20.0 already renderstype="email"on the signup login input.
requests and token signups (activation, reset, invitation) go to core.
signup()come from an allow-list (login,name,empty
password) instead of all ofrequest.params, which end up in asudo
copy()of the template user. The email is taken fromlogin, so theactivation mail can't be sent to another address. Core's guard runs first:
404 when signup is disabled.
signup(), as core's_prepare_signup_valuesdoes, so the activation email is not sent in thetemplate user's language.
email) ignored, 404 when signup is disabled, duplicate email rejected, GETnever signs up, token signups left to core.
Notes for reviewers
data//demo/. #1034 adds anupgrades/script that drops stalewebsite-specific copies of
auth_signup.signup, because they brokevalidation of
signup_login_fields. That view is gone; the only remainingview inherits
auth_signup.fields, so the script is not needed here.The original
[MIG]changes were installed and tested on a clean 20.0database with demo data, with
auth_password_policy_signupalso installed. Thereview changes were not run locally; CI covers them.