Skip to Content
Menú
This question has been flagged
2 Respostes
5439 Vistes

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

Avatar
Descartar
Best Answer

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

https://ibb.co/tLpfjWn


Avatar
Descartar
Best Answer
query = """
select * from your_table where id = """+str(self.id)+"""
"""
self.env.cr.execute(query)
data = self.env.cr.fetchone()



Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de set. 21
2513
0
d’oct. 21
1691
2
de març 18
9279
3
de des. 23
18346
0
de maig 24
664