Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4357 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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
        }
}
Ảnh đại diện
Huỷ bỏ

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 :-)

Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 6 23
2582
1
thg 9 22
2908
1
thg 8 22
2850
0
thg 4 22
3798
1
thg 1 22
4723