Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
14224 Ansichten

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
Verwerfen
Beste Antwort

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
Verwerfen
Autor

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

cr.commit() thats it.

Autor

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

Verknüpfte Beiträge Antworten Ansichten Aktivität
0
Mai 20
2901
0
Juni 16
10802
1
Apr. 15
5286
0
März 15
4428
4
Dez. 23
36448