Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3900 มุมมอง

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มี.ค. 15
5160
0
มี.ค. 15
3439
1
มี.ค. 15
8396
link a custom field to two tables/modul แก้ไขแล้ว
1
มิ.ย. 19
6841
1
มี.ค. 15
7906