Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
14178 มุมมอง

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

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
พ.ค. 20
2873
0
มิ.ย. 16
10771
1
เม.ย. 15
5262
0
มี.ค. 15
4396
4
ธ.ค. 23
36388