Skip to Content
Menú
This question has been flagged

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)       

 

Avatar
Descartar
Related Posts Respostes Vistes Activitat
2
de set. 24
2065
0
de nov. 23
1973
1
de maig 25
4452
1
de gen. 23
1663
1
d’oct. 22
5003