Odoo Help


webkit report and selection field

on 3/11/13, 4:53 PM 3,034 views

Hi, In a webkit report, how can I get the value instead of the key for a selection field ? AMa

pls can you help me how can i create a selection field in my form ?

i will be thanksfull

on 4/1/13, 6:50 AM

Please see developer doc on http://doc.openerp.com/v6.0/developer/2_5_Objects_Fields_Methods/field_type.html you need to made class with field type "fields.selection()" and add it to the view like this: <field name="water_source" colspan="1"/>. It's more than just simple. its simplest ;)

Yuri A. Petrov
on 4/2/13, 10:15 AM
Erdem Uney
On 1/27/14, 2:19 PM

Yuri's solution didn't worked for me. Here is my solution.

Since you create the module with selections like below.

'gender': fields.selection(
        [('male', 'Male'), ('female', 'Female')],

I have added the below code in my template before the output of the field.

   gndr = dict([('male', 'Male'), ('female', 'Female')])
   gndrout = str(gndr[o.gender]) 

Then when displaying, put out the rendered field, as below.

<p>${ gndrout or "" |entity}</p>
Yuri A. Petrov
On 3/31/13, 1:17 PM

This is working for me:


That didn't worked for me. Below is my solution

7Gates Interactive Technologies, Erdem Uney
on 1/27/14, 1:22 PM

About This Community

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


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 3/11/13, 4:53 PM
Seen: 3034 times
Last updated: 3/16/15, 8:10 AM