Hi guys,
How to Create openerp user through Python code ?
I have created a custom menu, there i need to create openerp user.
How can we override create method for this.
i refered below link:
\https://www.odoo.com/forum/help-1/question/how-to-create-openerp-user-through-python-code-34090
def create(self, cr, uid, vals, context=None):
user_obj = self.pool.get('res.users')
vals_user = {
'name': vals.get('name'),
'login': default_login,
#other required field
}
user_obj.create(cr, uid, vals_user, context)
result = super(hr_employee, self).create(cr, uid, vals, context=context)
return result
I didnt understood "'login': default_login",
How to do this? Is there any other method's?
Thanks,