Skip to Content
Menu
This question has been flagged
2 Replies
9293 Rodiniai

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..

Portretas
Atmesti
Best Answer

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"
Portretas
Atmesti
Autorius

Thank you very much prakash...

Best Answer

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'),`
Portretas
Atmesti
Autorius

thanks krupesh

correct the answer.

Related Posts Replies Rodiniai Veikla
0
bal. 22
2188
0
kov. 15
5629
1
kov. 15
13861
0
kov. 15
3783
0
kov. 15
3581