'Utility method used to add an "Open Parent" button in partner views'

@api.multi
def open_parent(self):

    self.ensure_one()
    address_form_id = self.env.ref('base.view_partner_address_form').id
    return {'type': 'ir.actions.act_window', 'res_model': 'res.partner', 'view_mode': 'form', 'views': [(address_form_id, 'form')], 'res_id': self.parent_id.id, 'target': 'new', 'flags': {'form': {'action_buttons': True}}}
