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

hi ,


i have to "selected fields " in the table account.invoice i want that when i select one the other value display directly the second field depend to the first

what would i do ? 

I have two fields ' selected ' in the table 'account.invoice' 'district ' , "common" , I want when I select'common' the other one is displayed directly without the select


Ảnh đại diện
Huỷ bỏ

Maybe you want to enhance your chance to get an answer by using meaningful question titles, use some more words to make yourself understandable and maybe to post some code.

Câu trả lời hay nhất

you can use onchange decorator .

its make you able to make a change to your GUI.

@api.onchange('field1') # if these fields are changed, call method
def check_change(self):
    if self.field1 == somevalue:
        self.field2=yourValue
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 4 25
4183
3
thg 12 22
12268
5
thg 4 24
42925
6
thg 4 24
39966
3
thg 3 24
11219