Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3111 มุมมอง

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.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
พ.ค. 20
5
2
ต.ค. 25
14339
1
พ.ย. 23
1900
0
ส.ค. 23
1424
0
ก.พ. 22
11949