Se rendre au contenu
Menu
Cette question a été signalée
2 Réponses
9239 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Auteur

Thank you very much prakash...

Meilleure réponse

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
Ignorer
Auteur

thanks krupesh

correct the answer.

Publications associées Réponses Vues Activité
0
avr. 22
2135
0
mars 15
5584
1
mars 15
13804
0
mars 15
3741
0
mars 15
3537