Skip to Content
Menu
This question has been flagged

I've got a problem when adding, data to model at database creation. After the database is created I'm trying to change the partner/user data, but sometimes the changes are added to a different database.

dispatch_rpc('db', 'create_database', [master_pwd, db_name, demo_data, lang, pwd, login, country_code, phone])
request.session.authenticate(db_name, login, pwd)
user = request.env['res.users'].search([('login', '=', login)])
user.partner_id.write(vals)

Should I use request differently when searching after authenticate? 

When I didn't use workers it worked.

Avatar
Discard
Related Posts Replies Views Activity
0
May 20
4
1
Nov 23
492
0
Aug 23
354
1
Aug 20
11107
0
Feb 22
9780