[REF] all: pass pre-commit on the whole repo
Some checks failed
CI / lint (pull_request) Successful in 33s
CI / test (pull_request) Failing after 9m29s
CI / review (pull_request) Has been skipped

Needed for the lint job of the CI to go green. Mostly automatic hook
fixes (black, isort, prettier, pyupgrade, autoflake, whitespace). By hand:

- flake8: two unused imports, an ambiguous variable name `l`.
- pylint-odoo mandatory: manifest keys equal to their default value
  (installable, application, data, external_dependencies).
- end-of-file-fixer skips *.patch too, like trailing-whitespace: the
  upstream patches stay as git format-patch wrote them.

No behaviour change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
GitHub Copilot 2026-10-04 14:17:09 +02:00
parent d9d9e8be2d
commit fbd43bb459
Signed by: snt
GPG key ID: A9FD34930EADBE71
45 changed files with 330 additions and 295 deletions

View file

@ -1,11 +1,13 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, http
from odoo.addons.auth_signup.controllers.main import AuthSignupHome
from odoo.addons.web.controllers.home import SIGN_UP_REQUEST_PARAMS
from odoo import _
from odoo import http
from odoo.exceptions import UserError
from odoo.http import request
from odoo.addons.auth_signup.controllers.main import AuthSignupHome
from odoo.addons.web.controllers.home import SIGN_UP_REQUEST_PARAMS
# partner_firstname exposes `firstname` / `lastname` on res.users and
# res.partner; we need them as accepted qcontext params so the signup form
# roundtrips them transparently through `get_auth_signup_qcontext`.
@ -18,7 +20,10 @@ SIGN_UP_REQUEST_PARAMS.add("lastname")
SIGN_UP_REQUEST_PARAMS.add("accepted_terms")
# Session keys used by the membership signup flow.
MEMBERSHIP_SIGNUP_SESSION_KEYS = ("membership_signup_active", "membership_signup_product_id")
MEMBERSHIP_SIGNUP_SESSION_KEYS = (
"membership_signup_active",
"membership_signup_product_id",
)
class AuthSignupHomeMembership(AuthSignupHome):
@ -71,9 +76,7 @@ class AuthSignupHomeMembership(AuthSignupHome):
values["firstname"] = firstname
values["lastname"] = lastname
partner_model = request.env["res.partner"]
values["name"] = partner_model._get_computed_name(
lastname, firstname
)
values["name"] = partner_model._get_computed_name(lastname, firstname)
return values
@http.route()
@ -134,4 +137,4 @@ class AuthSignupHomeMembership(AuthSignupHome):
# Drop the markers: the membership flow is now complete.
for key in MEMBERSHIP_SIGNUP_SESSION_KEYS:
request.session.pop(key, None)
return request.redirect("/shop/cart")
return request.redirect("/shop/cart")