Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
4871 Visualizzazioni

I need to fetch the data using related res_id = fields.many2one('res.partner') name:fields.related('res_id','emp_id.location',type='char',size=64)

i.e i have emp_id and m2o for emp_location and emp_id is stored in res.partner

Avatar
Abbandona
Risposta migliore

hey Maniganda

you said res_id in your current model , so you can get related field like this

    location=res_id.emp_id.emp_location

now all the value you can get from that location like this:

    name=location.name

and same other field too

thanks
sandeep

Avatar
Abbandona
Autore

this can be possible while creating fields ?? i.e in fields.related

if there is related field then many2one field must be there for thats relation , as you mention in your Q

Autore

thank you Sandeep i will try

Post correlati Risposte Visualizzazioni Attività
1
mag 24
2807
2
set 23
2543
1
ago 23
2844
1
gen 23
32773
3
ott 22
22168