Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
14050 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Tác giả

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

cr.commit() thats it.

Tác giả

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

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 5 20
2784
0
thg 6 16
10626
1
thg 4 15
5171
0
thg 3 15
4262
4
thg 12 23
36203