تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
2743 أدوات العرض

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
نوفمبر 24
29998
0
ديسمبر 21
2318
0
أبريل 15
4615
2
مارس 15
10403
1
مارس 15
3950