跳至内容
菜单
此问题已终结

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

形象
丢弃
最佳答案

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

https://ibb.co/tLpfjWn


形象
丢弃
最佳答案
query = """
select * from your_table where id = """+str(self.id)+"""
"""
self.env.cr.execute(query)
data = self.env.cr.fetchone()



形象
丢弃
相关帖文 回复 查看 活动
1
9月 21
2749
0
10月 21
1691
2
3月 18
9550
3
12月 23
18527
0
5月 24
822