Add CorpContact.nation for nationality
This commit is contained in:
parent
f2882f29cf
commit
16ca90f6eb
4 changed files with 19 additions and 3 deletions
|
|
@ -231,7 +231,7 @@ class CorpContactAdmin(admin.ModelAdmin):
|
|||
search_fields = ('last_name', 'first_name', 'role')
|
||||
fields = (('civility', 'last_name', 'first_name'),
|
||||
('street', 'pcode', 'city'),
|
||||
('birth_date',),
|
||||
('birth_date', 'nation'),
|
||||
('corporation',),
|
||||
('sections', 'is_main', 'always_cc', 'archived'),
|
||||
('role', 'ext_id'), ('tel', 'email'), ('avs',),
|
||||
|
|
|
|||
16
stages/migrations/0032_contact_nationalite.py
Normal file
16
stages/migrations/0032_contact_nationalite.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('stages', '0031_remove_contact_ccp'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='corpcontact',
|
||||
name='nation',
|
||||
field=models.CharField(blank=True, max_length=40, verbose_name='Nationalité'),
|
||||
),
|
||||
]
|
||||
|
|
@ -482,6 +482,7 @@ class CorpContact(models.Model):
|
|||
first_name = models.CharField(max_length=40, blank=True, verbose_name='Prénom')
|
||||
last_name = models.CharField(max_length=40, verbose_name='Nom')
|
||||
birth_date = models.DateField(blank=True, null=True, verbose_name='Date de naissance')
|
||||
nation = models.CharField("Nationalité", max_length=40, blank=True)
|
||||
role = models.CharField(max_length=40, blank=True, verbose_name='Fonction')
|
||||
street = models.CharField(max_length=100, blank=True, verbose_name='Rue')
|
||||
pcode = models.CharField(max_length=4, blank=True, verbose_name='Code postal')
|
||||
|
|
|
|||
|
|
@ -307,8 +307,7 @@ class CompensationForm:
|
|||
[
|
||||
self.formating('Date de naissance :'),
|
||||
django_format(person.birth_date, 'j F Y') if person.birth_date else '.' * 30,
|
||||
self.formating('Nationalité :'),
|
||||
'.' * 30,
|
||||
self.formating('Nationalité :'), person.nation or '.' * 30,
|
||||
],
|
||||
[
|
||||
self.formating('N° de téléphone :'), person.tel or '.' * 30,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue