Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
3788 Widoki

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

Awatar
Odrzuć
Najlepsza odpowiedź

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


Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
lut 25
6020
1
gru 24
1536
1
lis 22
16091
3
sie 22
13185
2
sie 22
4595