Skip to Content
Menu
This question has been flagged
2 Replies
4697 Rodiniai

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 

Portretas
Atmesti
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

Portretas
Atmesti
Autorius

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}
Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
5
gruod. 23
18880
2
lapkr. 21
33174
7
kov. 20
7747
1
spal. 18
10081
1
kov. 17
5467