跳至内容
菜单
此问题已终结
1 回复
5691 查看

I have enable the reset password setting in openerp. And found that a button appears at the login screen enabling user to reset password. Inspecting this button, I found that this button is using a xml rpc call service to send a email with reset password link.. 

self.rpc("/auth_signup/reset_password", { dbname: db, login: login }).done(function(result) {

                self.show_error(_t("An email has been sent with credentials to reset your password"));

});

So I wanted to use this service in my client app, to enable the user to reset password same as the openerp does, so I have written the following code:

$.xmlrpc({  

url: 'http://openerp.example.com/auth_signup/reset_password',

methodName: 'call',

dataType: 'jsonrpc',

// params: [dbname, 'sperson3', ''],

params: {'dbname':dbname, 'login':'user1', 'context':{}},

success: function(response, status, jqXHR) {

console.log(response);

alert('success')

},

error: function(response, status, jqXHR) {

console.log(response);

alert('error')

},

});

But this always returning in error. am I doing something wrong? can we use the service like this. Please help me for this.


形象
丢弃
编写者 最佳答案

Solution: 

odoo.com/forum/help-1/question/how-to-implement-the-openerp-v7-forgot-password-functionality-in-client-app-84886

形象
丢弃
相关帖文 回复 查看 活动
3
7月 25
2991
1
10月 24
2180
1
4月 24
2238
0
9月 23
1741
1
6月 23
2195