Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Authenticate User in Odoo with function session_authenticate() in POS

By
NhuVanTran
on 5/17/15, 8:37 AM 514 views

Hi all,

I try calling function session_authenticate(db, login, password) to verify a user. But server returned a error 

TypeError: authenticate() takes at least 4 arguments (3 given)

Here is my code, I called it in a function which I overriden in module PosWidget by : "module.PosWidget.include".

instance.session.session_authenticate(instance.session.db, instance.session.login, password);
// password : a string which is entered by user in text box.

You can find function session_authenticate(db, login, password) in /web/static/src/js/chrome.js and /web/static/src/js/openerpframework.js.

Function authenticate() (on server) in /web/controllers/main.py

Thanks all


Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 5/17/15, 8:37 AM
Seen: 514 times
Last updated: 5/17/15, 8:37 AM