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

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


頭像
捨棄

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.

最佳答案

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
頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
4月 25
4159
3
12月 22
12252
5
4月 24
42916
6
4月 24
39948
3
3月 24
11211