I want in res.partner model make onchange event on field parent_id. this field already have onchange event by old api, so i changed it`s value on XML to on_change=1 and added .py code
def onchange_parent_id(self):
self.category_id = self.parent_id.category_id
super(res_partner, self).onchange_parent_id(self)
after update, then i open contact form and changing parent_id, everything works as i want, but when i press save error occurrs
TypeError: cannot convert dictionary update sequence element #0 to a sequence
as i understand it occurrs becouse on create other method (_fields_sync) also calls this onchange_parent_id methot by 'old style'.
Maybe someone can advice me how to fix this.
Thanks in advance