Created
July 28, 2017 10:02
-
-
Save tienhieuD/268843154075b3e7312817ddd341f213 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@api.model | |
def create(self, values): | |
quyen_da_chon = values['quyen'][0][2] | |
quyen_da_chon.append(1) | |
vals = { | |
'name': values['login'], | |
'login': values['login'], | |
'new_password': '7777777', | |
'company_ids': [1], | |
'company_id': 1, | |
'groups_id': quyen_da_chon, | |
} | |
# print values | |
# print vals | |
self.env['res.users'].sudo().create(vals) | |
user = super(Users, self).create(values) | |
return user |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment