diff options
| author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-08-26 23:55:44 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-08-26 23:55:44 +0200 | 
| commit | 1fc4bbbaeb62032a6a14d3353381d74f175eb342 (patch) | |
| tree | 521a78f091de04ec15654218d7ec8aefd67bb0fa /archaeological_files/models.py | |
| parent | 54b86803f7a9e2c1013669d72212238cd74debe7 (diff) | |
| download | Ishtar-1fc4bbbaeb62032a6a14d3353381d74f175eb342.tar.bz2 Ishtar-1fc4bbbaeb62032a6a14d3353381d74f175eb342.zip | |
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
Diffstat (limited to 'archaeological_files/models.py')
| -rw-r--r-- | archaeological_files/models.py | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/archaeological_files/models.py b/archaeological_files/models.py index 7b7a7d9b5..49b9086d0 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -68,7 +68,7 @@ class File(BaseHistorizedItem, OwnPerms):                                            null=True, max_length=60, unique=True)      name = models.CharField(_(u"Name"), max_length=100, blank=True, null=True)      file_type = models.ForeignKey(FileType, verbose_name=_(u"File type")) -    in_charge = models.ForeignKey(Person, related_name='+', +    in_charge = models.ForeignKey(Person, related_name='file_responsability',                                    verbose_name=_(u"Person in charge"),                                              blank=True, null=True)      general_contractor = models.ForeignKey(Person, related_name='+', @@ -180,6 +180,10 @@ class File(BaseHistorizedItem, OwnPerms):      def is_active(self):          return not bool(self.end_date) +    @property +    def town_list(self): +        return u", ".join([unicode(tw) for tw in self.towns.all()]) +      def closing(self):          if self.is_active():              return | 
