跳至内容
菜单
此问题已终结
1 回复
3035 查看

I inherited a Selection field and added 2 options. I verified and they are present.

The selection field has the next form:

[('area', 'Area'),('power_consumption', 'Consumo de energía')]

When i try to create new records with this options i get an error.

I have tried:

<field name="selection_field">area</field>

<field name="selection_field" eval="area"/>

But when i use a selection field like [('1':'Something')] and use <field name="selection_field">1</field> there are no errors. How does theese fields work and how should i create my xml file?

形象
丢弃
最佳答案

Hi, 

The correct syntax for selection fields is this : 

[('area', 'Area'),('power_consumption', 'Consumo de energía')]

形象
丢弃
编写者

Sorry, i wrote it wrong here. I still can´t create the record with the selection field...