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

Hello everyone,

I have created field with many2one field it display like tablename.name,1 in the drop down instead of correct name.

Can any one help me...

Thanks In advanced..

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Many2one drop box shows relation table column name value or _rec_name field value

  'field_id': fields.many2one('mymodule.relation.model', 'Test'),

check many2one relation model table "name" column is available.

or

If 'name' column is not available in python file then create

    _rec_name = "field_name"
อวตาร
ละทิ้ง
ผู้เขียน

Thank you very much prakash...

คำตอบที่ดีที่สุด

add _id after completing your field name

  • Example:

    `fieldname': fields.many2one('ObjectName', 'Label', help='Help note'),`
    

make it

 ` fieldname_id': fields.many2one('ObjectName', 'Label', help='Help note'),`
อวตาร
ละทิ้ง
ผู้เขียน

thanks krupesh

correct the answer.

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
เม.ย. 22
2182
0
มี.ค. 15
5620
1
มี.ค. 15
13856
0
มี.ค. 15
3776
0
มี.ค. 15
3574