Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
3804 Visualizzazioni

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
Abbandona
Risposta migliore

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


Avatar
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
feb 25
6031
1
dic 24
1549
1
nov 22
16104
3
ago 22
13203
2
ago 22
4611