Repository: svthalia/concrexit

Issue:
Cannot add Partner postal code of another country
### Describe the bug
I felt like this was in between a feature request and bug, but decided to make it a bug report since this bugs me.
When adding/editing a Partner in the site administration, the company address only accepts valid postal codes from the Netherlands (1234AB). We have a new partner ([https://thalia.nu/career/partners/exellys/](https://thalia.nu/career/partners/exellys/)) that only has offices in Belgium and has a postal code of 2800, and the form rejects this, so I had to settle with 2800ME instead (it's in Mechelen). It would be nice if the postal code was less strict, which shouldn't cause too many issues, since the little Google Maps location already looks fine if I use the incorrect 2800ME but add the correct country to the city.

### How to reproduce
Steps to reproduce the behaviour:
1. Go to 'Partners' in Site administration, and add/edit a partner.
2. Fill in required information, and set postal code to 2800 (or sth else). In this example, I set "City" to "Mechelen, Belgium".
3. Click any save button.
4. Input is rejected.

### Expected behaviour
I would hope for it to not reject the postal code.

### Screenshots
![image](https://user-images.githubusercontent.com/6312298/96731400-836f8980-13b7-11eb-9c7a-a20100e0b034.png)




Discussion:
Nice, I think we should just change the way these addresses are entered and mimick the way we do this for members since those fields support addresses all over Europe. Some corners were cut here (and we have not had foreign sponsors apparently)

Resolving patch:
diff --git a/website/partners/admin.py b/website/partners/admin.py
--- a/website/partners/admin.py
+++ b/website/partners/admin.py
@@ -44,7 +44,10 @@ class PartnerAdmin(admin.ModelAdmin):
                 )
             },
         ),
-        (_("Address"), {"fields": ("address", "zip_code", "city")}),
+        (
+            _("Address"),
+            {"fields": ("address", "address2", "zip_code", "city", "country")},
+        ),
     )
 
 
diff --git a/website/partners/migrations/0018_auto_20201123_2047.py b/website/partners/migrations/0018_auto_20201123_2047.py
new file mode 100644
--- /dev/null
+++ b/website/partners/migrations/0018_auto_20201123_2047.py
@@ -0,0 +1,28 @@
+# Generated by Django 3.1.2 on 2020-11-23 19:47
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('partners', '0017_auto_20200907_1835'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='partner',
+            name='address2',
+            field=models.CharField(blank=True, max_length=100, null=True, verbose_name='Second address line'),
+        ),
+        migrations.AddField(
+            model_name='partner',
+            name='country',
+            field=models.CharField(choices=[('AX', 'Åland Islands'), ('AL', 'Albania'), ('AD', 'Andorra'), ('AT', 'Austria'), ('BY', 'Belarus'), ('BE', 'Belgium'), ('BA', 'Bosnia and Herzegovina'), ('BG', 'Bulgaria'), ('HR', 'Croatia'), ('CZ', 'Czechia'), ('DK', 'Denmark'), ('EE', 'Estonia'), ('FO', 'Faroe Islands'), ('FI', 'Finland'), ('FR', 'France'), ('DE', 'Germany'), ('GI', 'Gibraltar'), ('GR', 'Greece'), ('GG', 'Guernsey'), ('VA', 'Vatican City'), ('HU', 'Hungary'), ('IS', 'Iceland'), ('IE', 'Ireland'), ('IM', 'Isle of Man'), ('IT', 'Italy'), ('JE', 'Jersey'), ('LV', 'Latvia'), ('LI', 'Liechtenstein'), ('LT', 'Lithuania'), ('LU', 'Luxembourg'), ('MK', 'Macedonia (FYROM)'), ('MT', 'Malta'), ('MD', 'Moldova'), ('MC', 'Monaco'), ('ME', 'Montenegro'), ('NL', 'Netherlands'), ('NO', 'Norway'), ('PL', 'Poland'), ('PT', 'Portugal'), ('RO', 'Romania'), ('RU', 'Russian Federation'), ('SM', 'San Marino'), ('RS', 'Serbia'), ('SK', 'Slovakia'), ('SI', 'Slovenia'), ('ES', 'Spain'), ('SJ', 'Svalbard and Jan Mayen'), ('SE', 'Sweden'), ('CH', 'Switzerland'), ('UA', 'Ukraine'), ('GB', 'United Kingdom')], max_length=2, null=True, verbose_name='Country'),
+        ),
+        migrations.AlterField(
+            model_name='partner',
+            name='zip_code',
+            field=models.CharField(max_length=12),
+        ),
+    ]
diff --git a/website/partners/models.py b/website/partners/models.py
--- a/website/partners/models.py
+++ b/website/partners/models.py
@@ -6,6 +6,7 @@
 from tinymce.models import HTMLField
 
 from utils.translation import ModelTranslateMeta, MultilingualField
+from utils import countries
 
 
 class Partner(models.Model):
@@ -36,17 +37,19 @@ class Partner(models.Model):
             )
         ],
     )
-    zip_code = models.CharField(
-        max_length=12,
-        validators=[
-            RegexValidator(
-                regex=r"^[1-9][0-9]{3}[\s]?[A-Za-z]{2}$",
-                message=_("Enter a valid zip code"),
-            )
-        ],
+
+    address2 = models.CharField(
+        max_length=100, verbose_name=_("Second address line"), blank=True, null=True,
     )
+
+    zip_code = models.CharField(max_length=12,)
+
     city = models.CharField(max_length=100)
 
+    country = models.CharField(
+        max_length=2, choices=countries.EUROPE, verbose_name=_("Country"), null=True,
+    )
+
     def save(self, **kwargs):
         """Save a partner and set main/local partners."""
         if self.is_main_partner:


Test patch: