Here are the steps you must follow in order to install the Spanis localization for Odoo 9:
sudo wget https://github.com/OCA/l10n-spain/archive/9.0.zip
sudo unzip 9.0.zip
sudo chown -R daemon:daemon l10n-spain-9.0/
sudo cp -a ./l10n-spain-9.0/* ./
sudo rm -rf ./l10n-spain-9.0
Then go to Apps -> Update Apps List (please remember to enable developer mode as detailed in the prior guide). Then go to Apps -> Apps (the second one) deactivate the "Featured" tag in the search bar and write l10n_es. There will be all the installed translations.
Install all of them. I could need some dependecies.
Here you can find a detailed explanation on how to install these translations.