Odoo Help


Number of options in radio button declaration will depend on a variable

Lakay lakay
on 10/7/14, 2:46 AM 841 views

Hi, I have a question   (im using Odoo v9.0 alpha)

ive added a field in 'res_users' by override:

python code:

class res_users(osv.osv):




xml code: ive added this line

<field name="testing" widget="radio"/>

So we are able to display a 2 radio button like this

o Testing1                                Option 1

Testing2                                Option 2

is it possible to generate (n) number of options for my radio button (earlier there are only 2 options) now i want  for example, the number of records in my customize module is 4 how will i edit my definition here so it will be depending on the number of records of my customize module       'testing:fields.selection([('testing1','Testing1'),('testing2','Testing2')],'Testing'),




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

1 follower(s)


Asked: 10/7/14, 2:46 AM
Seen: 841 times
Last updated: 3/16/15, 8:10 AM