I have a code that fetches some information on the Internet and returns it as a Python list. I want to display (without saving in the database) in Odoo tree view.
For this, I created a computed field as follow:
created_time = fields.Char(compute='_compute_created_time')
@api.multi
def _compute_created_time(self):
my_data = self.my_internet_data()
created_time_list = []
for created_times in my_data:
created_time_list.append(created_times['created_time'])
self.created_time = created_time_list
When the tree view is rendered it display a single row with all the data in it. This is not the way I want.
I want to display each single data in the list in its own row. I believe for this to happen I must not use fields.Char() as the field type. So, what field type is there for me to use or any other solution?