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

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..

アバター
破棄
最善の回答

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.

アバター
破棄
著作者

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

cr.commit() thats it.

著作者

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

関連投稿 返信 ビュー 活動
0
5月 20
2777
0
6月 16
10618
1
4月 15
5164
0
3月 15
4253
4
12月 23
36182