Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
14016 Представления

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
2764
0
июн. 16
10600
1
апр. 15
5148
0
мар. 15
4231
4
дек. 23
36147