Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
5 Trả lời
13061 Lượt xem

From Odoo 12 on the module containing the field password_crypt was merged into Odoo base module and so can't be retrieved. There is no "password_crypt" field in "res_users" table any more., the password only can be written but not read.

We used the Odoo 11 credentials to login to other applications, which can't be integrate in Odoo. This authentication stopped working and I'm looking for a way to get read access to the Odoo password, any clue how we could do that? Is there any method in the API retrieve the crypted password from Odoo 13 to use it for user login in external applications?

Ảnh đại diện
Huỷ bỏ

Hi Gerald,

I'm facing the same problem, did you find a way to solve it?

Kind regards,

Dries

Tác giả

Finally I did it making a custom module. It contains a custom API endpoint which answers true or false to the given request with given user and password.

Câu trả lời hay nhất

The password field is not included in the readable list of fields, so I don't think it will be returned.

Here is the link:

https://github.com/odoo/odoo/blob/13.0/odoo/addons/base/models/res_users.py#L208

And the list:

SELF_READABLE_FIELDS = ['signature', 'company_id', 'login', 'email', 'name', 'image', 'image_medium', 'image_small', 'lang', 'tz', 'tz_offset', 'groups_id', 'partner_id', '__last_update', 'action_id']

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

There is only one password field anymore, which contains the password hash.

This may give you some help: https://www.odoo.com/de_DE/forum/hilfe-1/question/how-to-reset-the-odoo-admin-user-password-a-summary-for-different-odoo-versions-131992

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

You can simply retrieve your password while login in your database and it will be hashed.

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Thanks for the answer. The problem is that password field seems to be write only. It is empty when retrieving it using the API. That's what I do with python to get admin user data:

user = models.execute_kw(db, uid, password,
    'res.users', 'search_read',
    [[['id', '=', 2]]],
    {})
print user

Any hint how to READ the hashed password?

Ảnh đại diện
Huỷ bỏ

I'm not a developer, unfortunately, hopefully someone chimes in.

Bài viết liên quan Trả lời Lượt xem Hoạt động
Admin User Missing Đã xử lý
2
thg 9 21
6630
6
thg 1 25
116333
3
thg 3 23
16317
1
thg 9 21
2746
2
thg 3 15
6425