2017-04-25 48 views

回答

0

你可以選擇場鍵,通過以下的方法值對。

result=self.env[model].fields_get([field_name]) 
    key=False 
    if result and result.get(field_name) and result.get(field_name).get('selection'): 
     for dict_value in result.get(field_name).get('selection'): 
      print dict_value 

這可能對你有所幫助。