İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
3806 Görünümler

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! :)

Avatar
Vazgeç
En İyi Yanıt

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


Avatar
Vazgeç
En İyi Yanıt

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

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Şub 25
6032
1
Ara 24
1550
1
Kas 22
16106
3
Ağu 22
13203
2
Ağu 22
4612