コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
1205 ビュー
I want to get a field to change its domain given a condition, this is not working for me, it duplicates the fields



                 
                  
                             
                        

                    
 
                         
                             
                             
                         
                     

アバター
破棄
最善の回答

Hi Pavel,

I am not sure how you did your implementation, but you can make the domain dynamic with onchange function, such as:

@api.onchange('type') 
def onchange_type(self): 
​for rec in self: return {'domain': {'category_id': [('type', '=', rec.type)]}}

Or please try to share your code with us :)

Sincerely

Ivana from edoo.is

アバター
破棄