Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
5486 Prikazi

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

Avatar
Opusti
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
Opusti
Best Answer
query = """
select * from your_table where id = """+str(self.id)+"""
"""
self.env.cr.execute(query)
data = self.env.cr.fetchone()



Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
sep. 21
2582
0
okt. 21
1691
2
mar. 18
9330
3
dec. 23
18387
0
maj 24
670