Odoo Help

0
1 Answer
0
Avatar

Yenthe Van Ginneken

--Yenthe Van Ginneken--
15036
| 8 8 10
België
--Yenthe Van Ginneken--

My Odoo blog: http://www.odoo.yenthevg.com/

My Twitter: https://twitter.com/Yenthe666


Yenthe Van Ginneken
19-03-19 12:10

Hi LaLibreRie,

You shouldn't directly create a user with a name from here. Instead create an user with a 'login' which you link to the res.partner record that you create while creating the user. This way the exception will not go off. Example:

self.test_user = self.env['res.users'].create({
    'login': 'testuser',
    'partner_id': self.env['res.partner'].create({
        'name': "Strawman Test User"
    }).id
})

Regards,
Yenthe

Stel een vraag
Writer
Keep Informed
1 volger(s)
About This Community

This platform 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.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now