I override onchange_partner_id and it works perfectly if I create contact with type "contact" but if I chose type "delivery address" onchange is not triggered.. why is that and how can I fix it?
def onchange_parent_id(self, cr, uid, ids, parent_id, context=None):
res = super(ResPartner, self).onchange_parent_id(cr, uid, ids, parent_id, context=context)
new_contact_obj = self.browse(cr,uid,ids,context=context)
parent_obj = self.browse(cr,uid, parent_id,context=context)
if not new_contact_obj.multiply_pricelists_ids:
new_contact_obj.multiply_pricelists_ids = parent_obj.multiply_pricelists_ids
return res
Maybe it's because of this check:
I think that due to that condition the onchange occurs but returns no values from parent.