跳至內容
選單
此問題已被標幟
1 回覆
1440 瀏覽次數
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
2月 25
960
3
6月 23
11178
1
7月 25
3503
0
3月 25
873
2
11月 23
2515