diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-12-16 23:53:12 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-12-17 00:56:59 +0100 |
commit | ab08f491d15667aae9e49cb3c6f4c21afd6c6fbe (patch) | |
tree | 1c4a03911e8bc4f0eda998b3d9542a85892c37b0 /ishtar_common | |
parent | 1a1040243a10366b01b9bc2c4d3140f2fbd321e4 (diff) | |
download | Ishtar-ab08f491d15667aae9e49cb3c6f4c21afd6c6fbe.tar.bz2 Ishtar-ab08f491d15667aae9e49cb3c6f4c21afd6c6fbe.zip |
Add a responsible of town planning services to files
Diffstat (limited to 'ishtar_common')
-rw-r--r-- | ishtar_common/fixtures/groups_person_types-SRA-fr.json | 15 | ||||
-rw-r--r-- | ishtar_common/models.py | 5 |
2 files changed, 16 insertions, 4 deletions
diff --git a/ishtar_common/fixtures/groups_person_types-SRA-fr.json b/ishtar_common/fixtures/groups_person_types-SRA-fr.json index 9a43072b2..1f60d131f 100644 --- a/ishtar_common/fixtures/groups_person_types-SRA-fr.json +++ b/ishtar_common/fixtures/groups_person_types-SRA-fr.json @@ -345,6 +345,17 @@ } }, { + "pk": 8, + "model": "ishtar_common.persontype", + "fields": { + "comment": "", + "available": true, + "txt_idx": "responsible_planning_service", + "groups": [], + "label": "Chef de service instructeur" + } + }, + { "pk": 5, "model": "ishtar_common.persontype", "fields": { @@ -374,11 +385,11 @@ "available": true, "txt_idx": "secretarial_dept", "groups": [ - 2, 1, + 2, 3, - 7, 6, + 7, 8, 9, 10, diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 57bcee5c5..29906adef 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -711,7 +711,8 @@ class Organization(Address, OwnPerms, ValueGetter): class PersonType(GeneralType): #rights = models.ManyToManyField(WizardStep, verbose_name=_(u"Rights")) - groups = models.ManyToManyField(Group, verbose_name=_(u"Groups")) + groups = models.ManyToManyField(Group, verbose_name=_(u"Groups"), + blank=True, null=True) class Meta: verbose_name = _(u"Person type") verbose_name_plural = _(u"Person types") @@ -732,7 +733,7 @@ class Person(Address, OwnPerms, ValueGetter) : name = models.CharField(_(u"Name"), max_length=30) email = models.CharField(_(u"Email"), max_length=40, blank=True, null=True) person_types = models.ManyToManyField(PersonType, verbose_name=_(u"Types")) - attached_to = models.ForeignKey('Organization', + attached_to = models.ForeignKey('Organization', related_name='members', verbose_name=_(u"Is attached to"), blank=True, null=True) class Meta: |