Hi Pinakin, Vitap, Gopakumar,
Thank you for your comments.
For the moment I succeed in storing the result of my SQL queries in a field type text.
cr.execute('SELECT name from product_bat where name is not null')
res = cr.fetchall()
result['product_BAT'] = res
'product_BAT': fields.text('product.bat'),
<field name="product_BAT"/>
The problem is that I have the list of my result in one line, seperate by some coma.
name1,name2,name3
Is it possible to store my result not in field.text but in a field that will print a tree with one line per result?
To Vitap Ramdevputra : For the moment I try to write directly in a common module but yes, in the futur I will create my own module.
To Gopakumar N G : Is with this kind of fields (one2many, many2many) that I will have a tree? I try to modify the fields in one2many but I don't succeed to store the result of my SQL Queries in this kind of type
To Pinakin Nayi : I will try to see how it works and I will get in touch.
Edit: I still have this problem and I am little deseperate so..if someone have an idea it will be a really good help.
Thank you again a lot
Selverine
have you tried creating a view from sql query? and yes you are creating a module right?.
You can use functional fields to show one2many and many2many fields, where the values are fetched using ORM methods or SQL queries.