Skip to Content
Menu
This question has been flagged
1779 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
1
Sep 24
680
1
Sep 24
138
0
Aug 24
118
1
Apr 24
7143
3
Mar 24
603