From 3a62c5b92b06d11331cb8aa9add47d22c32cae31 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 26 Aug 2013 23:55:44 +0200 Subject: Change Person selection form - add a Person sheet (refs #425) * change sheet creation to allow non historized object * add related names corresponding to person for operation, files and sources (through Author) * use a jqGrid associated to a form to select persons * create sheet templates for persons * add appropriate urls --- archaeological_operations/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'archaeological_operations') diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 589d8d69e..6619bc72e 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -79,8 +79,9 @@ class Operation(BaseHistorizedItem, OwnPerms): excavation_end_date = models.DateField(_(u"Excavation end date"), null=True, blank=True) end_date = models.DateField(_(u"Closing date"), null=True, blank=True) - in_charge = models.ForeignKey(Person, related_name='+', null=True, - blank=True, verbose_name=_(u"In charge")) + in_charge = models.ForeignKey(Person, blank=True, null=True, + verbose_name=_(u"In charge"), + related_name='operation_responsability') year = models.IntegerField(_(u"Year"), null=True, blank=True) operation_code = models.IntegerField(_(u"Operation code"), null=True, blank=True) -- cgit v1.2.3