Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
14247 Visualizzazioni

Hi,

i want change the value of a column in particular table using pgsql query from different .py file example i want execute query of res.partner in main.py which is in web module.how can i do this any idea from you.

Can you help me...

Thanks in advance..

Avatar
Abbandona
Risposta migliore

Hi,

In any where you can execute query if you get cursor (cr). So, in web module you can get the cursor using following way.

cr = request.session.cr

cr.execute("update res_partner set column1='value1' ")

I hope it is help to execute query in any where into openerp.

Avatar
Abbandona
Autore

Thanks for you replay @Emipro Technologies i have one more question how to commit the query

cr.commit() thats it.

Autore

Again thanks @Emipro Technologies i want to do this update activity while restoring dump how can i do this. any idea

Post correlati Risposte Visualizzazioni Attività
0
mag 20
2907
0
giu 16
10815
1
apr 15
5305
0
mar 15
4435
4
dic 23
36473