Skip to Content
Menú
This question has been flagged
2371 Vistes

Hello,


I'm looking forward to create an Odoo Studio Module that displays the return of an mysql request in the views.


So far, I successfully connected Odoo to the mysql DB using this existing module :

  \https\:\/\/apps\.odoo\.com\/apps\/modules\/13\.0\/base_external_dbsource\/\\\

\
\\

In\ an\ automated\ action\,\ I\ added\ \:\\

db_model2\=env\[\'\base.external.dbsource']
db_model=db_model2.browse(1)
conn=db_model.connection_open()

str1 = "SELECT * FROM solution WHERE id =3"
res = db_model.execute(str1)


And it works, in "res" I do have the return of the request.


Now I'm stuck at this part :

-Start the request as you enter the module (not an automated action at the creation)

- Display the return of the request in a view


Does anyone already made such a thing ?

I really want to stick to Odoo Studio, even if I believe a "real" module would fit better to such a use case.


Thanks for your help.

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de maig 25
614
2
de març 25
1020
0
de febr. 25
742
0
de febr. 25
840
0
de febr. 25
852