Ir al contenido
Menú
Se marcó esta pregunta
2373 Vistas

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
Publicaciones relacionadas Respuestas Vistas Actividad
1
may 25
628
2
mar 25
1034
0
feb 25
744
0
feb 25
841
0
feb 25
862