Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
2 Respostas
5506 Visualizações

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

Avatar
Cancelar
Melhor resposta

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

https://ibb.co/tLpfjWn


Avatar
Cancelar
Melhor resposta
query = """
select * from your_table where id = """+str(self.id)+"""
"""
self.env.cr.execute(query)
data = self.env.cr.fetchone()



Avatar
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
set. 21
2595
0
out. 21
1691
2
mar. 18
9339
3
dez. 23
18404
0
mai. 24
683