def on_change_cm_id(self,cr, uid, ids,cm_id,context=None):
context=context or {}
attributes_product_template = []
value = {}
if ids:
old_note_ids = self.pool.get('product.attribute.line').search(cr, uid,[('product_tmpl_id','in',ids)])
self.pool.get('product.attribute.line').unlink(cr, uid, old_note_ids)
attribute_cm_ids = []
attribute_cm_ids = self.pool.get('attribute.comun.denominador.line').search(cr, uid, [('comun_denominador_id', '=', cm_id)])
for attribute_id in self.pool.get('attribute.comun.denominador.line').read(cr, uid, attribute_cm_ids, ['attribute_comun_denominador_id', 'value_comun_denominador_ids']):
attributes_product_template.append((0,0,{'value_ids':attribute_id['value_comun_denominador_ids'],'attribute_id':attribute_id['attribute_comun_denominador_id'][0]}))
value.update(attribute_line_ids=attributes_product_template)
return {'value':value}
In for loop, I acces two diferent fields, I use for loop because Im populating one2many and many2many field. Note that in arguments of my on_change function, I have cm_id as parameter, in your case would be employee_id.
Hope this help you