Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
5294 Visualizzazioni

can i use sql query in my automated (user interface) action with odoo?

Avatar
Abbandona
Risposta migliore

Yes, if you select "execute python code", you can execute SQL in automated action as shown in an example:

https://ibb.co/tLpfjWn


Avatar
Abbandona
Risposta migliore
query = """
select * from your_table where id = """+str(self.id)+"""
"""
self.env.cr.execute(query)
data = self.env.cr.fetchone()



Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
set 21
2416
0
ott 21
1691
2
mar 18
9141
3
dic 23
18230
0
mag 24
557