Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
5896 มุมมอง

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()



อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
How to solved this SQL error ?? แก้ไขแล้ว
1
ก.ย. 21
2915
0
ต.ค. 21
1691
2
มี.ค. 18
9661
ERROR SQL Connection (bad user) แก้ไขแล้ว
3
ธ.ค. 23
18640
0
พ.ค. 24
908