I have code that retrieves some information on the Internet and returns it as a Python list. I want to display (without saving to the database) as an Odoo tree.
To do this, I created a calculated field as follows:
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 a tree render is displayed, it displays one row with all the data in it. This is not the way I want.
I want to display each individual information in a list on my line. I believe that for this I should not use fields.Char () as a field type. So what type of field to use for me or some other solution?
source
share