Skip to Content
Menu
This question has been flagged
2 Replies
3536 Views

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

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
Discard
Author

perfect working .... thanks Niyas

Best Answer

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
Discard
Related Posts Replies Views Activity
5
Dec 23
16745
2
Nov 21
31810
7
Mar 20
6109
1
Oct 18
9097
1
Mar 17
4304