Skip to Content
Menu
This question has been flagged
2222 Views

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
Discard
Related Posts Replies Views Activity
2
Mar 25
677
0
Feb 25
437
0
Feb 25
504
0
Feb 25
500
2
Feb 25
939