跳至內容
選單
此問題已被標幟
1 回覆
4079 瀏覽次數

Hi All

I Want To Create Two Objects With Relation (User , Gender ) And I Want The User Choose The Gender From Field Selection How Can I Do It Thanks

頭像
捨棄
最佳答案

You can do it with only a selection field for gender. You have to use many2one in case of you have the possibility of adding more genders, but since it's limited you can do a selection field:

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

and that's all

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
3月 15
5367
0
3月 15
3631
1
3月 15
8601
1
6月 19
7078
1
3月 15
8120