تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
1362 أدوات العرض
Hello, I would like to know if there is a way from a server action to execute an existing postgresql function in my database


الصورة الرمزية
إهمال
أفضل إجابة

Hello,

You can execute an existing postgresql function using server actions. 

For that choose the respective server action or create a server action from settings -> Technical -> Server Actions ( it is only available in developer mode). In that server action set the action type to "Execute Python Code". And then write the python code to execute postgresql function. Use self.env.cr.execute() and self.env.cr.fetchone() in the python code.

Hope it helps.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
فبراير 25
847
3
يونيو 23
10870
1
يوليو 25
3342
0
مارس 25
817
2
نوفمبر 23
2418