コンテンツへスキップ
メニュー
この質問にフラグが付けられました

when i change env i get data but all data from previous self env i lose it


# i get the name here

print(rec.partner_id.name)       


connection = sql_db.db_connect('odoo1')      

 with contextlib.closing(connection.cursor()) as cr:            

    env = api.Environment(cr, SUPERUSER_ID, {})            

    data = env['sale.order'].search([])


# i get False here

 print(rec.partner_id.name)       

 

アバター
破棄
関連投稿 返信 ビュー 活動
2
9月 24
2063
0
11月 23
1968
1
5月 25
4451
1
1月 23
1659
1
10月 22
5000