コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
4095 ビュー

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
5413
0
3月 15
3642
1
3月 15
8622
1
6月 19
7108
1
3月 15
8162