コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
9263 ビュー

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

アバター
破棄
最善の回答

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"
アバター
破棄
著作者

Thank you very much prakash...

最善の回答

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'),`
アバター
破棄
著作者

thanks krupesh

correct the answer.

関連投稿 返信 ビュー 活動
0
4月 22
2162
0
3月 15
5607
1
3月 15
13833
0
3月 15
3759
0
3月 15
3562