콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

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
2900
0
6월 16
10802
1
4월 15
5285
0
3월 15
4428
4
12월 23
36447