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

I have seen some decorators that are used to save or write, and others work with change events of the forms...

Is there a way to execute a method on read call for a model?, i.e., when the model is called for read records, because I need to process the data before displaying it. 

My model is only a table, no views, no froms, but I call if from come another module as need


頭像
捨棄
最佳答案

Hi Jose:

There is no decorator for read. But, you can define a computed field that does the required pre-processing of the data and use the computed field in your custom module.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
3
11月 24
29972
0
12月 21
2309
0
4月 15
4598
2
3月 15
10399
1
3月 15
3934