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

Hi all, 

I am using Odoo 10. I have a Many2one field, 

store_id = fields.Many2one('model.stores', 'Store ID', required=True, select=True)

It should store the store_id, but instead it stores the index of the store_id.

How do you store the value of the store_id?


Need your help. Thanks! :)

アバター
破棄
最善の回答

Use new field index in model.stores that stores the index.
use store_id.index to get index.


アバター
破棄
最善の回答

Dear  Apollo,

when you make Many2one field that will store the id only, because you have more than one field on another model. Easily way to get another data by add related field.


I hope I helped you...

アバター
破棄
関連投稿 返信 ビュー 活動
2
2月 25
6023
1
12月 24
1541
1
11月 22
16097
3
8月 22
13193
2
8月 22
4599