diff --git a/pms_l10n_es/data/pms_data.xml b/pms_l10n_es/data/pms_data.xml
index 0b3e7ae23b..f3da5287b7 100644
--- a/pms_l10n_es/data/pms_data.xml
+++ b/pms_l10n_es/data/pms_data.xml
@@ -4,6 +4,7 @@
DNI
D
+ 10
letters = {
0: "T",
@@ -43,6 +44,24 @@ else:
+
+ Spanish Residence permit
+ N
+ 30
+
+
+permit_first_letter=id_number.name[0:1]
+permit_last_letter = id_number.name[
+ len(id_number.name) - 1 : len(id_number.name)
+]
+if (permit_first_letter.upper() in ['X','Y']) and id_number.name[1:8].isdigit() and not permit_last_letter.isdigit():
+ failed = False
+else:
+ failed = True
+
+
+
+
@@ -51,9 +70,9 @@ else:
02
+ id="pms_l10n_es.document_type_spanish_residence"
+ model="res.partner.id_category"
+ >
05