Skip to Content
Menu
This question has been flagged

I have a selection field in a custom module:

'firmFlagDescr': fields.selection([(1, u'ΕΠΙΤΗΔΕΥΜΑΤΙΑΣ'), (0, u'ΜΗ ΕΠΙΤΗΔΕΥΜΑΤΙΑΣ'), (2, u'ΠΡΩΗΝ ΕΠΙΤΗΔΕΥΜΑΤΙΑΣ')], u'Κατάσταση')

It shows up fine in UI as a drop down box with all 3 options.

The problem is however that whatever change I make in the selection, it is not saved (either through clicking save via UI or changing value from python code).

Any pointers?

PS. OpenERP v7.0

Avatar
Discard
Author Best Answer

openERP doesn't like selection fields with integer keys.

Once the key-value tuple was changed to have string keys everything worked fine.
 

Avatar
Discard
Best Answer

firmFlagDescr': fields.selection([('1',u'ΕΠΙΤΗΔΕΥΜΑΤΙΑΣ'), ('0',u'ΜΗ ΕΠΙΤΗΔΕΥΜΑΤΙΑΣ'), ('2',u'ΠΡΩΗΝ ΕΠΙΤΗΔΕΥΜΑΤΙΑΣ')], u'Κατάσταση')

Avatar
Discard
Related Posts Replies Views Activity
0
Oct 19
3164
2
Mar 15
9893
1
Mar 17
9276
2
Feb 24
396
4
Oct 20
6601