Odoo Help

1

How to make one of the selection value invisible ?

By
Ajeng Shilvie
on 1/25/15, 11:21 PM 692 views

i make one fields selection like this ,

                'jenis_kelamin' : fields.selection([('1','Laki laki'),('2','Perempuan'),('3','GROUP CUSTOMER/JOINT PROMO')])

i use widget="radio" to make radio button. all i want to show on my form is only value with key number 1 and 2 without number 3 .. 

how can i make it ? Thanks in advance

 

1

Ivan

--Ivan--
3245
| 5 3 6
Jakarta, Indonesia
--Ivan--
Ivan
On 1/25/15, 11:28 PM

@Ajeng, AFAIK, you can't.  What I would advise you to do is to create a model to hold the possible values of jenis_kelamin with name and a boolean flag column (or any means you deemed appropriate for filtering) and make jenis_kelamin field a many2one field.  With this, you can put domain based on filtering criteria to show which values you want to display.

oh , i just wondering if its possible. Now i have to try your suggestion ... thanks ivan

Ajeng Shilvie
on 1/25/15, 11:31 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.

Register

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)

Stats

Asked: 1/25/15, 11:21 PM
Seen: 692 times
Last updated: 3/16/15, 8:10 AM