コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
3037 ビュー

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...