1
如何從循環填充選擇字段?從循環odoo中填充選擇字段9
實施例:
date = fields.Selection([],string='Date')
list = []
for i in diff:
print(i) #return 07:00
self.date = list
如何從循環填充選擇字段?從循環odoo中填充選擇字段9
實施例:
date = fields.Selection([],string='Date')
list = []
for i in diff:
print(i) #return 07:00
self.date = list
你可以選擇場鍵,通過以下的方法值對。
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
這可能對你有所幫助。