[FIX] auth_signup: bulk signup_url generation
When calling `_get_signup_url_for_action` on more than one partner,
because the `url` input parameter was re-used for the actual signup
URL before assigning to the partners map (in
559bdc976e), from the second iteration
onwards the signup URL will almost certainly get misgenerated to
redirect to the previous signup URL (accumulating).
As `signup_url` is not normally accessed in bulk this should not
usually be an issue.
Reported by Andreas Brückl
closes odoo/odoo#78223
X-original-commit: 4d9b23f60087e0e8ffcb85498f39324854f50cb8
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
This commit is contained in:
@@ -91,10 +91,10 @@ class ResPartner(models.Model):
|
||||
if fragment:
|
||||
query['redirect'] = base + werkzeug.urls.url_encode(fragment)
|
||||
|
||||
url = "/web/%s?%s" % (route, werkzeug.urls.url_encode(query))
|
||||
signup_url = "/web/%s?%s" % (route, werkzeug.urls.url_encode(query))
|
||||
if not self.env.context.get('relative_url'):
|
||||
url = werkzeug.urls.url_join(base_url, url)
|
||||
res[partner.id] = url
|
||||
signup_url = werkzeug.urls.url_join(base_url, signup_url)
|
||||
res[partner.id] = signup_url
|
||||
|
||||
return res
|
||||
|
||||
|
||||
Reference in New Issue
Block a user