Since August of 2015 the European Regulations on Succession became law in Spain having come into force in 2012.
The regulations contain around 84 articles (version below) the ones that interest the non Spanish community are the articles stating that we have the right stating that our last will and testament be governed by the law of our nationality or country of birth. Residents of Spain should by law have their wills governed by the Spanish law of succession which is rigid with forced heirs. Basically where 2/3 of the estate the children are equal and the only rightful beneficiaries. Only a third of the estate can be bequeathed by choice.
The clause can take different formats but in the main they state something like “I wish for my will to be governed by the law of my nationality”, “My wishes are that my will be governed by the law of England and Wales, or Scottish/German/Dutch/French law” and so on.
Those who hold more than one nationality can choose the nationality of which the law will govern.
There is not need for this clause for those who own property/assets in Spain but are residents of another country.
The EU drafted the regulations to include those non EU nationals residing in Spain from non EU (third countries) to be included.
Those with assets in Spain but residing in other countries should make sure that they do not have links to Spain in such a way that they would be considered to be residents of Spain.
In such an important matter, CAB Spain suggest the use of a lawyer for drafting individual wills.
I am a will drafts person working via www.spaininfo.eu