跳至內容
選單
此問題已被標幟
101 瀏覽次數

How do you people usually do dynamic form view for repetitive fields

Like i have a tyre management system and lets say at slot_1 has slot_1_brand, _size, _otd, _rtd, _condition, etc.

Do I have to do that for every single tyre statically if i specifically, SPECIFICALLY, want to show it in form view?

All the guides been telling me to just do usual one2many and show it in tree list. But I want it in form view, and it has to be able to have readonly and invisible conditioning plus buttons repeated for every single line of data of the tyre.slot model in form view

So please tell me how do I do this, thank you so much in advance for anyone answering 

頭像
捨棄

Do you mean to add an undefined number of fields in the form? Like slot_1_brand, slot_2_brand, slot_n_brand where n is to be determined by *something*? What is the outcome you are looking for and why exactly is a One2many field not suitable? Because a One2many field is supposed to exactly handle this scenario... Also, One2many lists in forms allow for readonly, invisible (and column_invisible) conditions as well. So far it sounds like really bad model design.

相關帖文 回覆 瀏覽次數 活動
3
10月 25
262
4
10月 25
2864
2
9月 25
1804
4
9月 25
6940
0
8月 25
879