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

In openerp 7 Is it possible to functional field output shows before save the records and Editable functional field?

الصورة الرمزية
إهمال
أفضل إجابة

I think yes.

Example on_change method:. link text

Just add any field for output in your result.

def custom_function(self, cr, uid, ids,  field_name_from_xml,  context=None):
    # work with input data
    #... your result in custom_addr
    custom_addr = 'Barcelona'
    return {
        'value': {
            'address': custom_addr # adress is must in your xml declaration in this case
        }
}
الصورة الرمزية
إهمال

but note that whenever you click save it will load data from function only

Yes, in this case not need to save the data, this works when you change the filed value... as I know :-)

المنشورات ذات الصلة الردود أدوات العرض النشاط
3
يونيو 23
2625
1
سبتمبر 22
2977
1
أغسطس 22
2911
0
أبريل 22
3857
1
يناير 22
4759