The process followed to finally arrive to the actual point of freedom on the field of capital movements have been a long and gradual.
At the beggining, every country had their limitations to the movement of capitals, persons, goods... This was the functioning of the markets until the creation of free trade areas as the one created in Europe with the Treaty on Functioning of the European Union.
Although the TFEU reflects the liberalization of capital movements, other treaties talked about this field: that is the case of the Treaty of Maastrich and the Treaty of Rome.
In the case of Rome, the elimination of the barreers that limitated the movement of capitals was only allowed in the case that the measure was applied to improve the permorfance of the common market.
Later, on 1962 the European Economic Comunity redacted four different listings where were reflect different types of capital operations and the process that was necessary for their approval. They were called listing A, B, C, and D.
Finally, from Maastricht and its last actualization, the article 63 from the TFEU, "all restrictions on the movement of capital between Member States and between Member States and third countries shall be prohibited".