Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
4333 มุมมอง

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Data for relations table แก้ไขแล้ว
1
เม.ย. 24
1815
1
ส.ค. 22
2631
0
พ.ค. 17
7295
1
มี.ค. 15
3791
0
ธ.ค. 24
682