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
- Comptabilité
- Inventaire
- PoS
- Project
- MRP
Cette question a été signalée
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.
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrirePublications associées | Réponses | Vues | Activité | |
---|---|---|---|---|
|
0
févr. 25
|
847 | ||
|
3
juin 23
|
10870 | ||
|
1
juil. 25
|
3342 | ||
|
0
mars 25
|
818 | ||
|
2
nov. 23
|
2418 |