Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
2 Besvarelser
9277 Visninger

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

Avatar
Kassér
Bedste svar

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"
Avatar
Kassér
Forfatter

Thank you very much prakash...

Bedste svar

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'),`
Avatar
Kassér
Forfatter

thanks krupesh

correct the answer.

Related Posts Besvarelser Visninger Aktivitet
0
apr. 22
2181
0
mar. 15
5618
1
mar. 15
13856
0
mar. 15
3772
0
mar. 15
3574