Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
9241 Vizualizări

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

Imagine profil
Abandonează
Cel mai bun răspuns

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"
Imagine profil
Abandonează
Autor

Thank you very much prakash...

Cel mai bun răspuns

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'),`
Imagine profil
Abandonează
Autor

thanks krupesh

correct the answer.

Related Posts Răspunsuri Vizualizări Activitate
0
apr. 22
2136
0
mar. 15
5587
1
mar. 15
13804
0
mar. 15
3744
0
mar. 15
3537