Skip to Content
Menú
This question has been flagged
2 Respostes
3810 Vistes

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

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


Avatar
Descartar
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
Descartar
Related Posts Respostes Vistes Activitat
2
de febr. 25
6040
1
de des. 24
1556
1
de nov. 22
16117
3
d’ag. 22
13218
2
d’ag. 22
4618