تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
14065 أدوات العرض

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
مايو 20
2799
0
يونيو 16
10633
1
أبريل 15
5183
0
مارس 15
4274
4
ديسمبر 23
36215