In wizard I have 2 fields one is res.users' m2o and Password. here user will ask the manager to enter the password to approve the process by entering the manager's password. But I am not able to find the way how to check that in the wizard and get true if password match and false if not matched.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Contabilità
- Magazzino
- PoS
- Project
- MRP
La domanda è stata contrassegnata
1
Rispondi
6154
Visualizzazioni
there is already login method written name as in res_user.py. You can take reference and apply same from your wizard.
@classmethod
def _login(cls, db, login, password):
if not password:
return False
user_id = False
try:
with cls.pool.cursor() as cr:
self = api.Environment(cr, SUPERUSER_ID, {})[cls._name]
user = self.search([('login', '=', login)])
if user:
user_id = user.id
user.sudo(user_id).check_credentials(password)
user.sudo(user_id)._update_last_login()
except AccessDenied:
user_id = False
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!
Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!
RegistratiPost correlati | Risposte | Visualizzazioni | Attività | |
---|---|---|---|---|
|
0
mag 25
|
1530 | ||
|
13
set 24
|
192694 | ||
|
2
ago 24
|
1665 | ||
|
2
lug 24
|
12704 | ||
Just started and I can't log in!
Risolto
|
|
6
dic 23
|
41942 |