Hello, I would like to know if there is a way from a server action to execute an existing postgresql function in my database
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
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.
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
0
Feb 25
|
846 | ||
|
3
Jun 23
|
10863 | ||
|
1
Jul 25
|
3341 | ||
|
0
Mar 25
|
817 | ||
Run server action only on certain products
Diselesaikan
|
|
2
Nov 23
|
2416 |