跳至內容
選單
此問題已被標幟
2697 瀏覽次數

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
2062
0
11月 23
1965
1
5月 25
4450
1
1月 23
1651
1
10月 22
4999