Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

why custom selection field value is not saved?

By
Dimitrios Tanis
on 8/4/14, 8:48 PM 917 views

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

0
Dimitrios Tanis
On 8/5/14, 4:05 AM

openERP doesn't like selection fields with integer keys.

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

0
Maurice Agée
On 10/3/15, 8:38 AM

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 8/4/14, 8:48 PM
Seen: 917 times
Last updated: 10/3/15, 8:38 AM