Repository navigation
[20.0][MIG] auth_signup_verify_email: 20.0 changes only (review view of OCA/server-auth#1064) - #1
Conversation
Reviewer's GuideImplementationUpdate exception handling and logging in passwordless signup for the 20.0 migration.
UIShow password fields only on valid token-based signup pages so users can set a password from the activation link.
ConfigurationBump the module version to 20.0.
TestsAdapt website and configuration setup for 20.0, and verify the activation page offers password fields.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="auth_signup_verify_email/tests/test_verify_email.py" line_range="25" />
<code_context>
# Enable public signup in website if it is installed; otherwise
# tests here would fail
- current_website = self.env["website"].get_current_website()
+ current_website = self.env.website or self.env.ref("base.default_website")
current_website.auth_signup_uninvited = "b2c"
- self.env["ir.config_parameter"].set_param("auth_signup.invitation_scope", "b2c")
</code_context>
<issue_to_address>
**Signup tests crash with website installed**
When the website signup field is present in the registry, `UICase.setUp` evaluates `self.env.website` at line 25; Odoo models are accessed through `self.env["website"]`, so this raises `AttributeError` and the UI tests abort before running.
Access the website model with `self.env["website"]` before selecting the current or default website.
</issue_to_address>
### Comment 2
<location path="auth_signup_verify_email/views/signup.xml" line_range="7" />
<code_context>
<template id="signup_fields" inherit_id="auth_signup.fields">
<xpath expr="//div[hasclass('field-password')]" position="attributes">
- <attribute name="t-if">only_passwords</attribute>
+ <attribute name="t-if">token and not invalid_token</attribute>
</xpath>
<xpath expr="//div[hasclass('field-confirm_password')]" position="attributes">
</code_context>
<issue_to_address>
**Password setup docs mislead users**
When an activating user follows the documented signup flow, the signup template renders password fields on the activation-link page, while the README says users are asked for a password only at their first login attempt; people following the documented flow encounter a different password-setting step.
Update the README to explain that users set their password from the activation link before their first login.
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: auth_signup_verify_email/tests/test_verify_email.py:25
| # Enable public signup in website if it is installed; otherwise | ||
| # tests here would fail | ||
| current_website = self.env["website"].get_current_website() | ||
| current_website = self.env.website or self.env.ref("base.default_website") |
There was a problem hiding this comment.
🟡 Medium · Signup tests crash with website installed
When the website signup field is present in the registry, UICase.setUp evaluates self.env.website at line 25; Odoo models are accessed through self.env["website"], so this raises AttributeError and the UI tests abort before running.
Access the website model with self.env["website"] before selecting the current or default website.
Prompt for AI agents
In `auth_signup_verify_email/tests/test_verify_email.py` at line 25:
**Signup tests crash with website installed**
When the website signup field is present in the registry, `UICase.setUp` evaluates `self.env.website` at line 25; Odoo models are accessed through `self.env["website"]`, so this raises `AttributeError` and the UI tests abort before running.
Access the website model with `self.env["website"]` before selecting the current or default website.| <template id="signup_fields" inherit_id="auth_signup.fields"> | ||
| <xpath expr="//div[hasclass('field-password')]" position="attributes"> | ||
| <attribute name="t-if">only_passwords</attribute> | ||
| <attribute name="t-if">token and not invalid_token</attribute> |
There was a problem hiding this comment.
⚪ Low · Password setup docs mislead users
When an activating user follows the documented signup flow, the signup template renders password fields on the activation-link page, while the README says users are asked for a password only at their first login attempt; people following the documented flow encounter a different password-setting step.
Update the README to explain that users set their password from the activation link before their first login.
Prompt for AI agents
In `auth_signup_verify_email/views/signup.xml` at line 7:
**Password setup docs mislead users**
When an activating user follows the documented signup flow, the signup template renders password fields on the activation-link page, while the README says users are asked for a password only at their first login attempt; people following the documented flow encounter a different password-setting step.
Update the README to explain that users set their password from the activation link before their first login.
Review aid for OCA#1064. The OCA PR also carries the module's full history and the open 19.0 migration (OCA#905), which makes its diff hard to read.
6a64c960[IMP] auth_signup_verify_email: pre-commit auto fixes710aa593[MIG] auth_signup_verify_email: Migration to 20.0, the same head as [20.0][MIG] auth_signup_verify_email: Migration to 20.0 OCA/server-auth#1064This diff contains only what the 20.0 migration changes. Not meant to be merged.
🤖 Generated with Claude Code
Summary by Sourcery
Migrate auth_signup_verify_email to Odoo 20.0 while preserving password verification during signup activation.
Bug Fixes:
Enhancements:
Tests: