diff --git a/addons/event/event.py b/addons/event/event.py index 0ee90eaa5f51f179b08f33d2151ffdd82876557f..0fb75014b752c4adf6eb647c888507bbef46a0fb 100644 --- a/addons/event/event.py +++ b/addons/event/event.py @@ -380,8 +380,9 @@ class event_registration(models.Model): @api.onchange('partner_id') def _onchange_partner(self): if self.partner_id: - contact = self.partner_id.address_get().get('default', False) - if contact: + contact_id = self.partner_id.address_get().get('default', False) + if contact_id: + contact = self.env['res.partner'].browse(contact_id) self.name = contact.name self.email = contact.email self.phone = contact.phone