Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
3776 Prikazi

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
Opusti
Best Answer

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


Avatar
Opusti
Best Answer

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
Opusti
Related Posts Odgovori Prikazi Aktivnost
2
feb. 25
6007
1
dec. 24
1529
1
nov. 22
16090
3
avg. 22
13175
2
avg. 22
4592