From b4969f97d86ad9be4aefad383c36a181b51259c9 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 16 Dec 2013 23:53:12 +0100 Subject: Add a responsible of town planning services to files --- ishtar_common/fixtures/groups_person_types-SRA-fr.json | 15 +++++++++++++-- ishtar_common/models.py | 5 +++-- 2 files changed, 16 insertions(+), 4 deletions(-) (limited to 'ishtar_common') 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 @@ -344,6 +344,17 @@ "label": "Am\u00e9nageur" } }, + { + "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", @@ -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: -- cgit v1.2.3