[FIX] auth_signup, website: make reset password multi website friendly

The "reset password" feature does not take into account
multi-website.

steps to reproduce:
- create a website A
- uncheck 'Shared Customer Accounts' on website A
- create a portal user user@example.com on website A
- create a website B
- uncheck 'Shared Customer Accounts' on website B
- create a portal user user@example.com on website B
- reset password for user@example.com on any website

before this commit:
An error is raised "No account found for this login"
(which is false, actually 2 accounts are found)

after this commit:
Only the user linked to the current website is properly
selected

opw-3551540

closes odoo/odoo#142110

X-original-commit: a2196253d6cf90dca3042a777703e0679f74f542
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit is contained in:
nda
2023-11-16 23:35:57 +00:00
parent f9568b50d9
commit 4612f6a7ee
5 changed files with 43 additions and 3 deletions
+4
View File
@@ -767,6 +767,10 @@ class Users(models.Model):
def _get_login_domain(self, login):
return [('login', '=', login)]
@api.model
def _get_email_domain(self, email):
return [('email', '=', email)]
@api.model
def _get_login_order(self):
return self._order