跳至內容
選單
此問題已被標幟
2 回覆
4560 瀏覽次數

I have a Custom module, that has a data that changes as time goes on, and i wish to change that data before its gets viewed. How can i achieve this in the easiest way?

頭像
捨棄
最佳答案

make it a functional field, the value of that type of field is calculated on the fly, you give it a function name in your class and the return value of that function is the field value (it actually has to return a dictionary of values so that it works in tree views as well as form views) there is some documentation on them here: https://doc.openerp.com/v6.0/developer/2_5_Objects_Fields_Methods/field_type.html/#functional-fields the main non-obvious trick is that the function definition has to be above the field definition (before the _columns={} bit)

頭像
捨棄
最佳答案

Check example of Functional Field. link text

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
4月 24
2173
1
8月 22
2930
0
5月 17
7618
1
3月 15
4039
0
12月 24
848