Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
9423 Vistas

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
Descartar
Mejor respuesta

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
Descartar
Autor

Thank you very much prakash...

Mejor respuesta

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
Descartar
Autor

thanks krupesh

correct the answer.

Publicaciones relacionadas Respuestas Vistas Actividad
0
abr 22
2301
0
mar 15
5687
1
mar 15
13917
0
mar 15
3865
0
mar 15
3688