İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
4597 Görünümler

i have this 

res['domain']=

{'grade_ids':[('cadre_id', '=',self.cadre_id.id)], 

 'employee_ids':[('shift_line_ids.cadre_id','=',self.cadre_id.id)]}


i want this 

i need to Append/update  ,('shift_line_ids.grade_id','=',self.grade_id.id) value 

res['domain']=

{'grade_ids':[('cadre_id', '=',self.cadre_id.id)], 

 'employee_ids':[('shift_line_ids.cadre_id','=',self.cadre_id.id),('shift_line_ids.grade_id','=',self.grade_id.id)]}

how i can ? any help/tips 

Avatar
Vazgeç
En İyi Yanıt

Hi,

You can try like this,

res['domain']['employee_ids'].append(('shift_line_ids.grade_id','=',self.grade_id.id))

Refer : Append data to a list within a dict

Thanks

Avatar
Vazgeç
Üretici

perfect working .... thanks Niyas

En İyi Yanıt

First you need to append domains in employee_ids and then you can update dict.

eg:

employee_ids.append(values)
res['domain'] = {'employee_ids': employee_ids}
Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
5
Ara 23
18694
2
Kas 21
33056
7
Mar 20
7594
1
Eki 18
9987
1
Mar 17
5366