Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
3019 Ansichten

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
Verwerfen
Beste Antwort

Hi, 

The correct syntax for selection fields is this : 

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

Avatar
Verwerfen
Autor

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