2017-04-25 47 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 

这可能对你有所帮助。