Skip to Content
Menu
This question has been flagged
1 Reply
2693 Views

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?

Avatar
Discard
Best Answer

Hi, 

The correct syntax for selection fields is this : 

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

Avatar
Discard
Author

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