Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
6423 Zobrazení

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

Avatar
Zrušit
Nejlepší odpověď

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

https://ibb.co/tLpfjWn


Avatar
Zrušit
Nejlepší odpověď
query = """
select * from your_table where id = """+str(self.id)+"""
"""
self.env.cr.execute(query)
data = self.env.cr.fetchone()



Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
zář 21
3546
0
říj 21
1691
2
bře 18
10381
3
pro 23
19107
0
kvě 24
1234