Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
5656 Lượt xem

I'm trying to figure out what's needed to render a tree view with custom data generated in one of my methods.

For example, if I have a list with strings:

myList = ["one","two","three"]

And I want it in something like this:

<tree string="myList">
     <field name="value"/>
</tree>

What do I need to do with my data to be able to feed them in to a similar xml? In my case, the values are calculated on the fly, so I don't want/need to save them in to the database.


It seems fairly easy to get a model from the database to show up in a tree view like this, but I want to feed data straight from python, not through the database.

I'm on odoo v9. Any help pointing in the right direction would be appreciated.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Okay, it seems like you are care about database size, you don't want store that data in database that's fine .

I think according to odoo structure it is not possible without store data in database, so you can create TransientModel to store temporary data.

I hope this is usefull.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 12 20
10047
3
thg 12 15
13994
4
thg 2 22
29170
13
thg 7 19
22401
3
thg 8 17
4831