跳至內容
選單
此問題已被標幟
2 回覆
9154 瀏覽次數

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
2052
0
3月 15
5529
1
3月 15
13763
0
3月 15
3689
0
3月 15
3497