跳至内容
菜单
此问题已终结
1 回复
3683 查看

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

 

形象
丢弃
最佳答案

@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