ERP-Ukraine / odoo-rpc-dart

Odoo RPC Library for Dart
MIT License
43 stars 32 forks source link

Request reset password #19

Closed gjae closed 2 years ago

gjae commented 2 years ago

Hello, how to make request to odoo server for reset password?

lem8r commented 2 years ago

Hi!

Same as calling any other method on a model.

If auth_signup module is installed something like this should work:

by user's id known from session

client.callKw({
    'model': 'res.users',
    'method': 'action_reset_password',
    'args': [user_id,],
    'kwargs': {},
});

or by user's login


client.callKw({
    'model': 'res.users',
    'method': 'reset_password',
    'args': ['login_name',],
    'kwargs': {},
});
gjae commented 2 years ago

Hi!

Same as calling any other method on a model.

If auth_signup module is installed something like this should work:

by user's id known from session

client.callKw({
    'model': 'res.users',
    'method': 'action_reset_password',
    'args': [user_id,],
    'kwargs': {},
});

or by user's login

client.callKw({
    'model': 'res.users',
    'method': 'reset_password',
    'args': ['login_name',],
    'kwargs': {},
});

Ooh i thought'nt that i can call model methods. I thought that just called to models actions (like search or write), very thankyou!