diff options
Diffstat (limited to 'archaeological_operations')
| -rw-r--r-- | archaeological_operations/forms.py | 113 | ||||
| -rw-r--r-- | archaeological_operations/locale/django.pot | 370 | ||||
| -rw-r--r-- | archaeological_operations/migrations/0049_auto__add_field_historicaloperation_abstract__add_field_operation_abst.py | 606 | ||||
| -rw-r--r-- | archaeological_operations/models.py | 3 | ||||
| -rw-r--r-- | archaeological_operations/templates/ishtar/sheet_operation.html | 6 | ||||
| -rw-r--r-- | archaeological_operations/tests.py | 25 | ||||
| -rw-r--r-- | archaeological_operations/views.py | 11 | 
7 files changed, 906 insertions, 228 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index ec66a2a7a..981e4e3b9 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -1,6 +1,6 @@  #!/usr/bin/env python  # -*- coding: utf-8 -*- -# Copyright (C) 2010-2015  Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2010-2016  Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet>  # This program is free software: you can redistribute it and/or modify  # it under the terms of the GNU Affero General Public License as @@ -411,15 +411,18 @@ OPERATOR, created = OrganizationType.objects.get_or_create(txt_idx='operator')  class OperationSelect(TableSelect): -    year = forms.IntegerField(label=_("Year")) -    operation_code = forms.IntegerField(label=_(u"Numeric reference")) -    common_name = forms.CharField(label=_(u"Name (full text search)"), -                                  max_length=30)      if settings.COUNTRY == 'fr':          code_patriarche = forms.IntegerField(label="Code PATRIARCHE") -    towns = get_town_field() +    common_name = forms.CharField(label=_(u"Name (full text search)"), +                                  max_length=30)      operation_type = forms.ChoiceField(label=_(u"Operation type"),                                         choices=[]) +    year = forms.IntegerField(label=_("Year")) +    operation_code = forms.IntegerField(label=_(u"Numeric reference")) +    towns = get_town_field() +    if settings.ISHTAR_DPTS: +        towns__numero_insee__startswith = forms.ChoiceField( +            label="Department", choices=[])      scientist = forms.IntegerField(          widget=widgets.JQueryAutoComplete(              reverse_lazy('autocomplete-person-permissive', @@ -427,6 +430,14 @@ class OperationSelect(TableSelect):                                           unicode(SRA_AGENT.pk)])]),              associated_model=Person),          label=_(u"Scientist in charge")) +    operator = forms.IntegerField( +        label=_("Operator"), +        widget=widgets.JQueryAutoComplete( +            reverse_lazy('autocomplete-organization', args=[OPERATOR.pk]), +            associated_model=Organization), +        validators=[valid_id(Organization)]) +    operator_reference = forms.CharField(label=_(u"Operator reference"), +                                         max_length=20)      in_charge = forms.IntegerField(          widget=widgets.JQueryAutoComplete(              reverse_lazy( @@ -436,14 +447,12 @@ class OperationSelect(TableSelect):              ),              associated_model=Person),          label=_(u"In charge")) -    operator = forms.IntegerField( -        label=_("Operator"), +    archaeological_sites = forms.IntegerField( +        label=_("Archaelogical site"),          widget=widgets.JQueryAutoComplete( -            reverse_lazy('autocomplete-organization', args=[OPERATOR.pk]), -            associated_model=Organization), -        validators=[valid_id(Organization)]) -    remains = forms.ChoiceField(label=_(u"Remains"), choices=[]) -    periods = forms.ChoiceField(label=_(u"Periods"), choices=[]) +            reverse_lazy('autocomplete-archaeologicalsite'), +            associated_model=models.ArchaeologicalSite), +        validators=[valid_id(models.ArchaeologicalSite)])      start_before = forms.DateField(label=_(u"Started before"),                                     widget=widgets.JQueryDate)      start_after = forms.DateField(label=_(u"Started after"), @@ -452,6 +461,8 @@ class OperationSelect(TableSelect):                                   widget=widgets.JQueryDate)      end_after = forms.DateField(label=_(u"Ended after"),                                  widget=widgets.JQueryDate) +    remains = forms.ChoiceField(label=_(u"Remains"), choices=[]) +    periods = forms.ChoiceField(label=_(u"Periods"), choices=[])      parcel = ParcelField(label=_("Parcel (section/number)"))      end_date = forms.NullBooleanField(label=_(u"Is open?"))      history_creator = forms.IntegerField( @@ -460,10 +471,14 @@ class OperationSelect(TableSelect):              reverse_lazy('autocomplete-person', args=['0', 'user']),              associated_model=Person),          validators=[valid_id(Person)]) +    abstract = forms.CharField(label=_(u"Abstract (full text search)"))      record_quality = forms.ChoiceField(label=_(u"Record quality"))      report_processing = forms.ChoiceField(label=_(u"Report processing"),                                            choices=[])      virtual_operation = forms.NullBooleanField(label=_(u"Virtual operation")) +    relation_types = forms.MultipleChoiceField( +        label=_(u"Search within relations"), choices=[], +        widget=forms.CheckboxSelectMultiple)      def __init__(self, *args, **kwargs):          super(OperationSelect, self).__init__(*args, **kwargs) @@ -481,12 +496,21 @@ class OperationSelect(TableSelect):          self.fields['periods'].help_text = models.Period.get_help()          self.fields['record_quality'].choices = \              [('', '--')] + list(models.QUALITY) +        if settings.ISHTAR_DPTS: +            k = 'towns__numero_insee__startswith' +            self.fields[k].choices = [ +                ('', '--')] + list(settings.ISHTAR_DPTS) +        self.fields['relation_types'].choices = models.RelationType.get_types( +            empty_first=False)      def get_input_ids(self):          ids = super(OperationSelect, self).get_input_ids()          ids.pop(ids.index('parcel'))          ids.append('parcel_0')          ids.append('parcel_1') +        ids.pop(ids.index('relation_types')) +        for idx, c in enumerate(self.fields['relation_types'].choices): +            ids.append('relation_types_{}'.format(idx))          return ids @@ -544,6 +568,13 @@ if FILES_AVAILABLE:                  reverse_lazy('autocomplete-file'), associated_model=File),              validators=[valid_id(File)], required=False) + +class OperationFormAbstract(forms.Form): +    form_label = _(u"Abstract") +    abstract = forms.CharField( +        label=_(u"Abstract"), +        widget=forms.Textarea(attrs={'class': 'xlarge'}), required=False) +  SLICING = (("month", _(u"months")), ('year', _(u"years")),)  DATE_SOURCE = (('creation', _(u"Creation date")), @@ -635,6 +666,21 @@ class OperationFormGeneral(forms.Form):                           'report_processing': models.ReportState,                           'archaeological_site': models.ArchaeologicalSite}      pk = forms.IntegerField(required=False, widget=forms.HiddenInput) +    if settings.COUNTRY == 'fr': +        code_patriarche = forms.IntegerField(label=u"Code PATRIARCHE", +                                             required=False) +    common_name = forms.CharField(label=_(u"Generic name"), required=False, +                                  max_length=120, widget=forms.Textarea) +    operation_type = forms.ChoiceField(label=_(u"Operation type"), +                                       choices=[]) +    year = forms.IntegerField(label=_(u"Year"), +                              initial=lambda: datetime.datetime.now().year, +                              validators=[validators.MinValueValidator(1900), +                                          validators.MaxValueValidator(2100)]) +    operation_code = forms.IntegerField( +        label=_(u"Operation code"), +        initial=models.Operation.get_available_operation_code, +        widget=OperationCodeInput(attrs={'readonly': 'readonly'}))      scientist = forms.IntegerField(          label=_("Head scientist"),          widget=widgets.JQueryAutoComplete( @@ -652,6 +698,8 @@ class OperationFormGeneral(forms.Form):              limit={'organization_type': (OPERATOR.pk,)},              associated_model=Organization, new=True),          validators=[valid_id(Organization)], required=False) +    operator_reference = forms.CharField(label=_(u"Operator reference"), +                                         required=False, max_length=20)      in_charge = forms.IntegerField(          label=_("In charge"),          widget=widgets.JQueryAutoComplete( @@ -660,8 +708,14 @@ class OperationFormGeneral(forms.Form):              associated_model=Person,              limit={'person_types': [SRA_AGENT.pk]}, new=True),          validators=[valid_id(Person)], required=False) -    operation_type = forms.ChoiceField(label=_(u"Operation type"), -                                       choices=[]) +    surface = forms.IntegerField( +        required=False, widget=widgets.AreaWidget, +        label=_(u"Total surface (m2)"), +        validators=[validators.MinValueValidator(0), +                    validators.MaxValueValidator(999999999)]) +    archaeological_site = widgets.MultipleAutocompleteField( +        model=models.ArchaeologicalSite, +        label=_("Associated archaeological sites"), new=True, required=False)      start_date = forms.DateField(          label=_(u"Start date"), required=False, widget=widgets.JQueryDate)      excavation_end_date = forms.DateField( @@ -672,36 +726,14 @@ class OperationFormGeneral(forms.Form):          widget=widgets.JQueryDate)      report_processing = forms.ChoiceField(label=_(u"Report processing"),                                            choices=[], required=False) -    surface = forms.IntegerField( -        required=False, widget=widgets.AreaWidget, -        label=_(u"Total surface (m2)"), -        validators=[validators.MinValueValidator(0), -                    validators.MaxValueValidator(999999999)]) -    year = forms.IntegerField(label=_(u"Year"), -                              initial=lambda: datetime.datetime.now().year, -                              validators=[validators.MinValueValidator(1900), -                                          validators.MaxValueValidator(2100)]) -    operation_code = forms.IntegerField( -        label=_(u"Operation code"), -        initial=models.Operation.get_available_operation_code, -        widget=OperationCodeInput(attrs={'readonly': 'readonly'})) -    common_name = forms.CharField(label=_(u"Generic name"), required=False, -                                  max_length=120, widget=forms.Textarea) -    operator_reference = forms.CharField(label=_(u"Operator reference"), -                                         required=False, max_length=20) -    archaeological_site = widgets.MultipleAutocompleteField( -        model=models.ArchaeologicalSite, -        label=_("Associated archaeological sites"), new=True, required=False)      if settings.COUNTRY == 'fr': -        negative_result = forms.NullBooleanField( -            required=False, label=u"Résultat considéré comme négatif") -        code_patriarche = forms.IntegerField(label=u"Code PATRIARCHE", -                                             required=False)          code_dracar = forms.CharField(              label=u"Code DRACAR", required=False,              validators=[validators.MaxLengthValidator(10)])          cira_date = forms.DateField(label=u"Date avis CIRA", required=False,                                      widget=widgets.JQueryDate) +        negative_result = forms.NullBooleanField( +            required=False, label=u"Résultat considéré comme négatif")          cira_rapporteur = forms.IntegerField(              label=u"Rapporteur CIRA",              widget=widgets.JQueryAutoComplete( @@ -1068,8 +1100,7 @@ class AdministrativeActOpeSelect(TableSelect):          if settings.ISHTAR_DPTS:              k = 'operation__towns__numero_insee__startswith'              self.fields[k].choices = [ -                ('', '--')] + [(str(dpt), str(dpt)) -                               for dpt in settings.ISHTAR_DPTS] +                ('', '--')] + list(settings.ISHTAR_DPTS)  class AdministrativeActOpeFormSelection(forms.Form): diff --git a/archaeological_operations/locale/django.pot b/archaeological_operations/locale/django.pot index 55f832463..f27f74e8b 100644 --- a/archaeological_operations/locale/django.pot +++ b/archaeological_operations/locale/django.pot @@ -7,12 +7,12 @@  msgid ""  msgstr "" -#: forms.py:69 forms.py:336 forms.py:854 forms.py:876 forms.py:880 -#: models.py:790 templates/ishtar/blocks/window_tables/parcels.html:8 +#: forms.py:69 forms.py:336 forms.py:883 forms.py:905 forms.py:909 +#: models.py:791 templates/ishtar/blocks/window_tables/parcels.html:8  msgid "Parcels"  msgstr "" -#: forms.py:72 forms.py:188 forms.py:830 models.py:780 +#: forms.py:72 forms.py:188 forms.py:859 models.py:781  #: templates/ishtar/blocks/window_tables/parcels.html:5  #: templates/ishtar/dashboards/dashboard_operation.html:302  #: templates/ishtar/dashboards/dashboard_operation.html:315 @@ -21,18 +21,18 @@ msgstr ""  msgid "Town"  msgstr "" -#: forms.py:74 forms.py:414 forms.py:680 forms.py:1043 models.py:161 -#: models.py:596 models.py:778 +#: forms.py:74 forms.py:414 forms.py:709 forms.py:1072 models.py:161 +#: models.py:597 models.py:779  #: templates/ishtar/blocks/window_tables/parcels.html:6  msgid "Year"  msgstr "" -#: forms.py:77 models.py:781 +#: forms.py:77 models.py:782  #: templates/ishtar/blocks/window_tables/parcels.html:7  msgid "Section"  msgstr "" -#: forms.py:80 models.py:782 +#: forms.py:80 models.py:783  msgid "Parcel number"  msgstr "" @@ -64,8 +64,8 @@ msgstr ""  msgid "Relation type"  msgstr "" -#: forms.py:348 ishtar_menu.py:33 models.py:240 models.py:495 models.py:520 -#: models.py:535 models.py:587 models.py:777 wizards.py:341 wizards.py:352 +#: forms.py:348 ishtar_menu.py:33 models.py:241 models.py:496 models.py:521 +#: models.py:536 models.py:588 models.py:778 wizards.py:341 wizards.py:352  #: templates/ishtar/sheet_operation.html:6  msgid "Operation"  msgstr "" @@ -94,328 +94,344 @@ msgstr ""  msgid "Name (full text search)"  msgstr "" -#: forms.py:421 forms.py:567 forms.py:663 forms.py:1020 models.py:170 +#: forms.py:421 +msgid "Archaelogical site" +msgstr "" + +#: forms.py:430 forms.py:596 forms.py:692 forms.py:1049 models.py:170  msgid "Operation type"  msgstr "" -#: forms.py:429 models.py:581 +#: forms.py:438 models.py:582  msgid "Scientist in charge"  msgstr "" -#: forms.py:438 forms.py:656 models.py:158 +#: forms.py:447 forms.py:685 models.py:158  msgid "In charge"  msgstr "" -#: forms.py:440 forms.py:569 forms.py:649 models.py:156 +#: forms.py:449 forms.py:598 forms.py:678 models.py:156  msgid "Operator"  msgstr "" -#: forms.py:445 forms.py:920 models.py:83 models.py:172 +#: forms.py:454 forms.py:949 models.py:83 models.py:172  msgid "Remains"  msgstr "" -#: forms.py:446 forms.py:899 forms.py:917 models.py:81 models.py:177 +#: forms.py:455 forms.py:928 forms.py:946 models.py:81 models.py:177  msgid "Periods"  msgstr "" -#: forms.py:447 +#: forms.py:456  msgid "Started before"  msgstr "" -#: forms.py:449 +#: forms.py:458  msgid "Started after"  msgstr "" -#: forms.py:451 +#: forms.py:460  msgid "Ended before"  msgstr "" -#: forms.py:453 +#: forms.py:462  msgid "Ended after"  msgstr "" -#: forms.py:455 +#: forms.py:464  msgid "Parcel (section/number)"  msgstr "" -#: forms.py:456 +#: forms.py:465  msgid "Is open?"  msgstr "" -#: forms.py:458 forms.py:1056 +#: forms.py:467 forms.py:1085  msgid "Created by"  msgstr "" -#: forms.py:463 forms.py:716 models.py:235 +#: forms.py:472 +msgid "Abstract (full text search)" +msgstr "" + +#: forms.py:473 forms.py:745 models.py:235  msgid "Record quality"  msgstr "" -#: forms.py:464 forms.py:673 models.py:189 +#: forms.py:474 forms.py:702 models.py:189  msgid "Report processing"  msgstr "" -#: forms.py:466 forms.py:719 models.py:230 +#: forms.py:476 forms.py:748 models.py:230  msgid "Virtual operation"  msgstr "" -#: forms.py:494 forms.py:1013 views.py:205 +#: forms.py:478 +msgid "Search within relations" +msgstr "" + +#: forms.py:516 forms.py:1042 views.py:214  msgid "Operation search"  msgstr "" -#: forms.py:507 forms.py:1015 +#: forms.py:529 forms.py:1044  msgid "You should select an operation."  msgstr "" -#: forms.py:538 +#: forms.py:560  msgid "Associated file"  msgstr "" -#: forms.py:542 forms.py:779 models.py:593 wizards.py:78 +#: forms.py:564 forms.py:808 models.py:594 wizards.py:78  msgid "Archaelogical file"  msgstr "" -#: forms.py:547 +#: forms.py:571 forms.py:573 models.py:237 +msgid "Abstract" +msgstr "" + +#: forms.py:576  msgid "months"  msgstr "" -#: forms.py:547 +#: forms.py:576  msgid "years"  msgstr "" -#: forms.py:549 models.py:142 +#: forms.py:578 models.py:142  msgid "Creation date"  msgstr "" -#: forms.py:550 +#: forms.py:579  msgid "Start of field work"  msgstr "" -#: forms.py:552 +#: forms.py:581  msgid "All"  msgstr "" -#: forms.py:553 +#: forms.py:582  msgid "Preventive"  msgstr "" -#: forms.py:554 +#: forms.py:583  msgid "Research"  msgstr "" -#: forms.py:558 +#: forms.py:587  msgid "Slicing"  msgstr "" -#: forms.py:561 +#: forms.py:590  msgid "Department detail"  msgstr "" -#: forms.py:563 +#: forms.py:592  msgid "Date get from"  msgstr "" -#: forms.py:565 +#: forms.py:594  msgid "Preventive/Research"  msgstr "" -#: forms.py:571 +#: forms.py:600  msgid "Date after"  msgstr "" -#: forms.py:573 +#: forms.py:602  msgid "Date before"  msgstr "" -#: forms.py:575 +#: forms.py:604  msgid "With reports"  msgstr "" -#: forms.py:576 +#: forms.py:605  msgid "With finds"  msgstr "" -#: forms.py:628 forms.py:1096 templates/ishtar/sheet_administrativeact.html:11 +#: forms.py:657 forms.py:1124 templates/ishtar/sheet_administrativeact.html:11  #: templates/ishtar/sheet_operation.html:32  msgid "General"  msgstr "" -#: forms.py:639 +#: forms.py:668  msgid "Head scientist"  msgstr "" -#: forms.py:666 models.py:51 models.py:145 models.py:950 +#: forms.py:695 models.py:51 models.py:145 models.py:951  msgid "Start date"  msgstr "" -#: forms.py:668 models.py:147 +#: forms.py:697 models.py:147  msgid "Excavation end date"  msgstr "" -#: forms.py:671 models.py:148 +#: forms.py:700 models.py:148  msgid "Report delivery date"  msgstr "" -#: forms.py:677 +#: forms.py:706  msgid "Total surface (m2)"  msgstr "" -#: forms.py:685 forms.py:774 models.py:162 models.py:374 +#: forms.py:714 forms.py:803 models.py:162 models.py:375  msgid "Operation code"  msgstr "" -#: forms.py:688 models.py:222 +#: forms.py:717 models.py:222  msgid "Generic name"  msgstr "" -#: forms.py:690 models.py:221 +#: forms.py:719 models.py:221  msgid "Operator reference"  msgstr "" -#: forms.py:694 +#: forms.py:723  msgid "Associated archaeological sites"  msgstr "" -#: forms.py:714 models.py:223 +#: forms.py:743 models.py:223  msgid "Comment"  msgstr "" -#: forms.py:744 +#: forms.py:773  msgid ""  "If you want to set an excavation end date you have to provide a start date."  msgstr "" -#: forms.py:749 +#: forms.py:778  msgid "The excavation end date cannot be before the start date."  msgstr "" -#: forms.py:764 +#: forms.py:793  #, python-format  msgid ""  "Operation code already exist for year: %(year)d - use a value bigger than "  "%(last_val)d"  msgstr "" -#: forms.py:768 +#: forms.py:797  msgid "Bad operation code"  msgstr "" -#: forms.py:800 +#: forms.py:829  msgid "Preventive informations - excavation"  msgstr "" -#: forms.py:801 models.py:175 +#: forms.py:830 models.py:175  #: templates/ishtar/dashboards/dashboard_operation.html:495  msgid "Cost (euros)"  msgstr "" -#: forms.py:802 models.py:180 +#: forms.py:831 models.py:180  msgid "Scheduled man-days"  msgstr "" -#: forms.py:804 models.py:183 +#: forms.py:833 models.py:183  msgid "Optional man-days"  msgstr "" -#: forms.py:806 models.py:186 +#: forms.py:835 models.py:186  msgid "Effective man-days"  msgstr "" -#: forms.py:816 +#: forms.py:845  msgid "Preventive informations - diagnostic"  msgstr "" -#: forms.py:819 models.py:205 +#: forms.py:848 models.py:205  msgid "Prescription on zoning"  msgstr "" -#: forms.py:821 models.py:208 +#: forms.py:850 models.py:208  msgid "Prescription on large area"  msgstr "" -#: forms.py:824 models.py:210 +#: forms.py:853 models.py:210  msgid "Prescription on geoarchaeological context"  msgstr "" -#: forms.py:828 forms.py:850 models.py:174 models.py:606 +#: forms.py:857 forms.py:879 models.py:174 models.py:607  msgid "Towns"  msgstr "" -#: forms.py:857 models.py:789 models.py:948 +#: forms.py:886 models.py:790 models.py:949  msgid "Parcel"  msgstr "" -#: forms.py:884 models.py:45 +#: forms.py:913 models.py:45  msgid "Remain types"  msgstr "" -#: forms.py:888 models.py:44 +#: forms.py:917 models.py:44  msgid "Remain type"  msgstr "" -#: forms.py:903 +#: forms.py:932  msgid "Period"  msgstr "" -#: forms.py:914 models.py:78 +#: forms.py:943 models.py:78  msgid "Reference"  msgstr "" -#: forms.py:915 models.py:79 +#: forms.py:944 models.py:79  msgid "Name"  msgstr "" -#: forms.py:939 +#: forms.py:968  msgid "This reference already exists."  msgstr "" -#: forms.py:956 +#: forms.py:985  msgid "Associated archaelogical sites"  msgstr "" -#: forms.py:962 ishtar_menu.py:36 ishtar_menu.py:63 ishtar_menu.py:125 +#: forms.py:991 ishtar_menu.py:36 ishtar_menu.py:63 ishtar_menu.py:125  msgid "Search"  msgstr "" -#: forms.py:967 +#: forms.py:996  msgid "Would you like to close this operation?"  msgstr "" -#: forms.py:972 +#: forms.py:1001  msgid "Would you like to delete this operation?"  msgstr "" -#: forms.py:981 forms.py:1044 models.py:522 models.py:572 +#: forms.py:1010 forms.py:1073 models.py:523 models.py:573  msgid "Index"  msgstr "" -#: forms.py:1007 +#: forms.py:1036  #, python-format  msgid ""  "Index already exists for operation: %(operation)s - use a value bigger than "  "%(last_val)d"  msgstr "" -#: forms.py:1019 +#: forms.py:1048  msgid "Operation's town"  msgstr "" -#: forms.py:1022 +#: forms.py:1051  msgid "Operation's year"  msgstr "" -#: forms.py:1033 +#: forms.py:1062  msgid "Documentation search"  msgstr "" -#: forms.py:1035 +#: forms.py:1064  msgid "You should select a document."  msgstr "" -#: forms.py:1048 forms.py:1099 models.py:546 models.py:566 +#: forms.py:1077 forms.py:1127 models.py:547 models.py:567  msgid "Act type"  msgstr "" -#: forms.py:1052 models.py:496 +#: forms.py:1081 models.py:497  #: templates/ishtar/dashboards/dashboard_operation.html:273  #: templates/ishtar/dashboards/dashboard_operation.html:286  #: templates/ishtar/dashboards/dashboard_operation.html:453 @@ -423,52 +439,52 @@ msgstr ""  msgid "Department"  msgstr "" -#: forms.py:1053 +#: forms.py:1082  msgid "Object (full text search)"  msgstr "" -#: forms.py:1076 views.py:339 +#: forms.py:1104 views.py:350  msgid "Administrative act search"  msgstr "" -#: forms.py:1091 forms.py:1145 forms.py:1212 +#: forms.py:1119 forms.py:1173 forms.py:1240  msgid "You should select an administrative act."  msgstr "" -#: forms.py:1104 models.py:597 +#: forms.py:1132 models.py:598  #: templates/ishtar/blocks/window_tables/administrativacts.html:8  msgid "Object"  msgstr "" -#: forms.py:1107 models.py:594 +#: forms.py:1135 models.py:595  msgid "Signature date"  msgstr "" -#: forms.py:1122 +#: forms.py:1150  msgid "Would you like to delete this administrative act?"  msgstr "" -#: forms.py:1127 +#: forms.py:1155  msgid "Template"  msgstr "" -#: forms.py:1151 forms.py:1155 +#: forms.py:1179 forms.py:1183  msgid "This document is not intended for this type of act."  msgstr "" -#: forms.py:1173 +#: forms.py:1201  msgid "Doc generation"  msgstr "" -#: forms.py:1175 +#: forms.py:1203  msgid "Generate the associated doc?"  msgstr "" -#: forms.py:1187 +#: forms.py:1215  msgid "Indexed?"  msgstr "" -#: forms.py:1196 ishtar_menu.py:110 views.py:373 +#: forms.py:1224 ishtar_menu.py:110 views.py:384  msgctxt "admin act register"  msgid "Register"  msgstr "" @@ -505,7 +521,7 @@ msgstr ""  msgid "General informations"  msgstr "" -#: ishtar_menu.py:94 models.py:241 +#: ishtar_menu.py:94 models.py:242  #: templates/ishtar/dashboards/dashboard_operation.html:9  msgid "Operations"  msgstr "" @@ -514,7 +530,7 @@ msgstr ""  msgid "Administrative Act"  msgstr "" -#: ishtar_menu.py:121 models.py:613 +#: ishtar_menu.py:121 models.py:614  #: templates/ishtar/sheet_administrativeact.html:6  msgid "Administrative act"  msgstr "" @@ -523,11 +539,11 @@ msgstr ""  msgid "Documents"  msgstr "" -#: models.py:50 models.py:66 models.py:1412 +#: models.py:50 models.py:66 models.py:1413  msgid "Order"  msgstr "" -#: models.py:52 models.py:951 +#: models.py:52 models.py:952  msgid "End date"  msgstr "" @@ -599,7 +615,7 @@ msgstr ""  msgid "In charge scientist"  msgstr "" -#: models.py:167 models.py:773 +#: models.py:167 models.py:774  msgid "File"  msgstr "" @@ -616,276 +632,276 @@ msgid ""  "If checked, it means that this operation have not been officialy registered."  msgstr "" -#: models.py:243 +#: models.py:244  msgid "Can view all Operation"  msgstr "" -#: models.py:244 +#: models.py:245  msgid "Can view own Operation"  msgstr "" -#: models.py:245 +#: models.py:246  msgid "Can add own Operation"  msgstr "" -#: models.py:246 +#: models.py:247  msgid "Can change own Operation"  msgstr "" -#: models.py:247 +#: models.py:248  msgid "Can delete own Operation"  msgstr "" -#: models.py:248 +#: models.py:249  msgid "Can close Operation"  msgstr "" -#: models.py:271 +#: models.py:272  msgid "OPE"  msgstr "" -#: models.py:331 +#: models.py:332  msgid "Intercommunal"  msgstr "" -#: models.py:357 models.py:534 +#: models.py:358 models.py:535  msgid "Archaeological file"  msgstr "" -#: models.py:358 +#: models.py:359  msgid "Code patriarche"  msgstr "" -#: models.py:400 +#: models.py:401  msgid "This operation code already exists for this year"  msgstr "" -#: models.py:466 +#: models.py:467  msgid "Inverse relation"  msgstr "" -#: models.py:470 +#: models.py:471  msgid "Operation relation type"  msgstr "" -#: models.py:471 +#: models.py:472  msgid "Operation relation types"  msgstr "" -#: models.py:484 +#: models.py:485  msgid "Operation record relation"  msgstr "" -#: models.py:485 +#: models.py:486  msgid "Operation record relations"  msgstr "" -#: models.py:506 +#: models.py:507  msgid "Operation documentation"  msgstr "" -#: models.py:507 +#: models.py:508  msgid "Operation documentations"  msgstr "" -#: models.py:510 +#: models.py:511  msgid "Can view all Operation source"  msgstr "" -#: models.py:512 +#: models.py:513  msgid "Can view own Operation source"  msgstr "" -#: models.py:514 +#: models.py:515  msgid "Can add own Operation source"  msgstr "" -#: models.py:516 +#: models.py:517  msgid "Can change own Operation source"  msgstr "" -#: models.py:518 +#: models.py:519  msgid "Can delete own Operation source"  msgstr "" -#: models.py:537 +#: models.py:538  msgid "Intended to"  msgstr "" -#: models.py:539 +#: models.py:540  msgid "Code"  msgstr "" -#: models.py:542 +#: models.py:543  msgid "Associated template"  msgstr "" -#: models.py:543 +#: models.py:544  msgid "Indexed"  msgstr "" -#: models.py:547 +#: models.py:548  msgid "Act types"  msgstr "" -#: models.py:570 +#: models.py:571  msgid "Person in charge of the operation"  msgstr "" -#: models.py:576 +#: models.py:577  msgid "Archaeological preventive operator"  msgstr "" -#: models.py:584 +#: models.py:585  msgid "Signatory"  msgstr "" -#: models.py:603 +#: models.py:604  msgid "Departments"  msgstr "" -#: models.py:604 +#: models.py:605  msgid "Cached values get from associated departments"  msgstr "" -#: models.py:607 +#: models.py:608  msgid "Cached values get from associated towns"  msgstr "" -#: models.py:614 +#: models.py:615  msgid "Administrative acts"  msgstr "" -#: models.py:617 +#: models.py:618  msgid "Can view all Administrative act"  msgstr "" -#: models.py:619 +#: models.py:620  msgid "Can view own Administrative act"  msgstr "" -#: models.py:621 +#: models.py:622  msgid "Can add own Administrative act"  msgstr "" -#: models.py:623 +#: models.py:624  msgid "Can change own Administrative act"  msgstr "" -#: models.py:625 +#: models.py:626  msgid "Can delete own Administrative act"  msgstr "" -#: models.py:634 +#: models.py:635  #: templates/ishtar/blocks/window_tables/administrativacts.html:5  msgid "Ref."  msgstr "" -#: models.py:717 +#: models.py:718  msgid "This index already exists for this year"  msgstr "" -#: models.py:784 +#: models.py:785  msgid "External ID"  msgstr "" -#: models.py:786 +#: models.py:787  msgid "Address - Locality"  msgstr "" -#: models.py:946 +#: models.py:947  msgid "Owner"  msgstr "" -#: models.py:954 +#: models.py:955  msgid "Parcel owner"  msgstr "" -#: models.py:955 +#: models.py:956  msgid "Parcel owners"  msgstr "" -#: models.py:981 +#: models.py:982  msgid "Recorded"  msgstr "" -#: models.py:982 +#: models.py:983  msgid "Effective"  msgstr "" -#: models.py:983 +#: models.py:984  msgid "Active"  msgstr "" -#: models.py:984 +#: models.py:985  msgid "Field completed"  msgstr "" -#: models.py:985 +#: models.py:986  msgid "Associated report"  msgstr "" -#: models.py:986 +#: models.py:987  msgid "Closed"  msgstr "" -#: models.py:987 +#: models.py:988  msgid "Documented and closed"  msgstr "" -#: models.py:1413 +#: models.py:1414  msgid "Is preventive"  msgstr "" -#: models.py:1416 +#: models.py:1417  msgid "Operation type old"  msgstr "" -#: models.py:1417 +#: models.py:1418  msgid "Operation types old"  msgstr "" -#: views.py:226 +#: views.py:236  msgid "New operation"  msgstr "" -#: views.py:260 +#: views.py:271  msgid "Operation modification"  msgstr "" -#: views.py:300 +#: views.py:311  msgid "Operation closing"  msgstr "" -#: views.py:306 +#: views.py:317  msgid "Operation deletion"  msgstr "" -#: views.py:311 +#: views.py:322  msgid "Operation: source search"  msgstr "" -#: views.py:319 +#: views.py:330  msgid "Operation: source creation"  msgstr "" -#: views.py:327 +#: views.py:338  msgid "Operation: source modification"  msgstr "" -#: views.py:333 +#: views.py:344  msgid "Operation: source deletion"  msgstr "" -#: views.py:348 +#: views.py:359  msgid "Operation: new administrative act"  msgstr "" -#: views.py:358 +#: views.py:369  msgid "Operation: administrative act modification"  msgstr "" -#: views.py:367 +#: views.py:378  msgid "Operation: administrative act deletion"  msgstr "" @@ -1049,14 +1065,6 @@ msgstr ""  msgid "Day"  msgstr "" -#: templates/ishtar/sheet_operation.html:61 -msgid "Remains:" -msgstr "" - -#: templates/ishtar/sheet_operation.html:62 -msgid "Periods:" -msgstr "" -  #: templates/ishtar/sheet_operation.html:84  msgid "Permit type:"  msgstr "" diff --git a/archaeological_operations/migrations/0049_auto__add_field_historicaloperation_abstract__add_field_operation_abst.py b/archaeological_operations/migrations/0049_auto__add_field_historicaloperation_abstract__add_field_operation_abst.py new file mode 100644 index 000000000..3bdc0e750 --- /dev/null +++ b/archaeological_operations/migrations/0049_auto__add_field_historicaloperation_abstract__add_field_operation_abst.py @@ -0,0 +1,606 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + +    def forwards(self, orm): +        # Adding field 'HistoricalOperation.abstract' +        db.add_column('archaeological_operations_historicaloperation', 'abstract', +                      self.gf('django.db.models.fields.TextField')(null=True, blank=True), +                      keep_default=False) + +        # Adding field 'Operation.abstract' +        db.add_column('archaeological_operations_operation', 'abstract', +                      self.gf('django.db.models.fields.TextField')(null=True, blank=True), +                      keep_default=False) + + +    def backwards(self, orm): +        # Deleting field 'HistoricalOperation.abstract' +        db.delete_column('archaeological_operations_historicaloperation', 'abstract') + +        # Deleting field 'Operation.abstract' +        db.delete_column('archaeological_operations_operation', 'abstract') + + +    models = { +        'archaeological_files.file': { +            'Meta': {'ordering': "('cached_label',)", 'object_name': 'File'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'cira_advised': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'classified_area': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'corporation_general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'general_contractor_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today', 'null': 'True', 'blank': 'True'}), +            'departments': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), +            'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'external_id': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), +            'file_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.FileType']"}), +            'general_contractor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'general_contractor_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imported_line': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_files_file'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'file_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'instruction_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}), +            'locality': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'main_town': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'file_main'", 'null': 'True', 'to': "orm['ishtar_common.Town']"}), +            'mh_listing': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'mh_register': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'numeric_reference': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'organization': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'permit_reference': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'permit_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.PermitType']", 'null': 'True', 'blank': 'True'}), +            'planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'planning_service_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'protected_area': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'raw_general_contractor': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'raw_town_planning_service': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'related_file': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.File']", 'null': 'True', 'blank': 'True'}), +            'requested_operation_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.OperationType']"}), +            'research_comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'responsible_town_planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'responsible_town_planning_service_files'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'saisine_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.SaisineType']", 'null': 'True', 'blank': 'True'}), +            'scientist': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'scientist'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'total_developed_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'total_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'file'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), +            'year': ('django.db.models.fields.IntegerField', [], {'default': '2016'}) +        }, +        'archaeological_files.filetype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'FileType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_files.permittype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'PermitType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_files.saisinetype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'SaisineType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'delay': ('django.db.models.fields.IntegerField', [], {'default': '30'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_operations.acttype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'ActType'}, +            'associated_template': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'acttypes'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.DocumentTemplate']"}), +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'indexed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'intented_to': ('django.db.models.fields.CharField', [], {'max_length': '1'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_operations.administrativeact': { +            'Meta': {'ordering': "('year', 'signature_date', 'index', 'act_type')", 'object_name': 'AdministrativeAct'}, +            'act_object': ('django.db.models.fields.TextField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'act_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.ActType']"}), +            'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), +            'departments_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_operations_administrativeact'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'adminact_operation_in_charge'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'index': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), +            'operator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'adminact_operator'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'ref_sra': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), +            'scientist': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'adminact_scientist'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'signatory': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'signatory'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'signature_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'towns_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_operations.archaeologicalsite': { +            'Meta': {'object_name': 'ArchaeologicalSite'}, +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_operations_archaeologicalsite'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'periods': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), +            'reference': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}), +            'remains': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.RemainType']", 'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_operations.historicaladministrativeact': { +            'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalAdministrativeAct'}, +            'act_object': ('django.db.models.fields.TextField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'act_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'associated_file_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'departments_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'history_creator_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'history_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), +            'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'history_modifier_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), +            'history_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), +            'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), +            'in_charge_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'index': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'operation_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'operator_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'ref_sra': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), +            'scientist_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'signatory_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'signature_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'towns_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_operations.historicaloperation': { +            'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalOperation'}, +            'abstract': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'associated_file_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'cached_label': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'cira_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'cira_rapporteur_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'code_dracar': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'code_patriarche': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'common_name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), +            'eas_number': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), +            'effective_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'excavation_end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'fnap_cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'fnap_financing': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'geoarchaeological_context_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'history_creator_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'history_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), +            'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'history_modifier_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), +            'history_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), +            'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), +            'in_charge_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'negative_result': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'operation_code': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'operation_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'operator_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'operator_reference': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), +            'optional_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'record_quality': ('django.db.models.fields.CharField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), +            'report_delivery_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'report_processing_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'scientist_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'virtual_operation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'zoning_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_operations.operation': { +            'Meta': {'ordering': "('cached_label',)", 'object_name': 'Operation'}, +            'abstract': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'archaeological_sites': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.ArchaeologicalSite']", 'null': 'True', 'blank': 'True'}), +            'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operations'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), +            'cached_label': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'cira_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'cira_rapporteur': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'cira_rapporteur'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'code_dracar': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'code_patriarche': ('django.db.models.fields.IntegerField', [], {'unique': 'True', 'null': 'True', 'blank': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'common_name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}), +            'eas_number': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), +            'effective_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'excavation_end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'fnap_cost': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'fnap_financing': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'geoarchaeological_context_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_operations_operation'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operation_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'negative_result': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'operation_code': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'operation_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['ishtar_common.OperationType']"}), +            'operator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operator'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'operator_reference': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), +            'optional_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'periods': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), +            'record_quality': ('django.db.models.fields.CharField', [], {'max_length': '2', 'null': 'True', 'blank': 'True'}), +            'remains': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['archaeological_operations.RemainType']", 'null': 'True', 'blank': 'True'}), +            'report_delivery_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'report_processing': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.ReportState']", 'null': 'True', 'blank': 'True'}), +            'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'scientist': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operation_scientist_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'towns': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.Town']", 'symmetrical': 'False'}), +            'virtual_operation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'zoning_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_operations.operationbydepartment': { +            'Meta': {'object_name': 'OperationByDepartment', 'db_table': "'operation_department'", 'managed': 'False'}, +            'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'operation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Operation']"}) +        }, +        'archaeological_operations.operationsource': { +            'Meta': {'object_name': 'OperationSource'}, +            'additional_information': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'associated_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'authors': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'operationsource_related'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Author']"}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'creation_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'duplicate': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'external_id': ('django.db.models.fields.CharField', [], {'max_length': '12', 'null': 'True', 'blank': 'True'}), +            'format_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Format']", 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'index': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'item_number': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'operation': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'source'", 'to': "orm['archaeological_operations.Operation']"}), +            'receipt_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'receipt_date_in_documentation': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'reference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'scale': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'source_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SourceType']"}), +            'support_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SupportType']", 'null': 'True', 'blank': 'True'}), +            'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}) +        }, +        'archaeological_operations.operationtypeold': { +            'Meta': {'ordering': "['-preventive', 'order', 'label']", 'object_name': 'OperationTypeOld'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'preventive': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_operations.parcel': { +            'Meta': {'ordering': "('year', 'section', 'parcel_number')", 'object_name': 'Parcel'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), +            'external_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_operations_parcel'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'operation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_operations.Operation']"}), +            'parcel_number': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), +            'section': ('django.db.models.fields.CharField', [], {'max_length': '4'}), +            'town': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'parcels'", 'to': "orm['ishtar_common.Town']"}), +            'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_operations.parcelowner': { +            'Meta': {'object_name': 'ParcelOwner'}, +            'end_date': ('django.db.models.fields.DateField', [], {}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_operations_parcelowner'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'parcel_owner'", 'to': "orm['ishtar_common.Person']"}), +            'parcel': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'owners'", 'to': "orm['archaeological_operations.Parcel']"}), +            'start_date': ('django.db.models.fields.DateField', [], {}) +        }, +        'archaeological_operations.period': { +            'Meta': {'ordering': "('order',)", 'object_name': 'Period'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'end_date': ('django.db.models.fields.IntegerField', [], {}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {}), +            'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.Period']", 'null': 'True', 'blank': 'True'}), +            'start_date': ('django.db.models.fields.IntegerField', [], {}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_operations.recordrelations': { +            'Meta': {'ordering': "('left_record', 'relation_type')", 'object_name': 'RecordRelations'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'left_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'right_relations'", 'to': "orm['archaeological_operations.Operation']"}), +            'relation_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.RelationType']"}), +            'right_record': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'left_relations'", 'to': "orm['archaeological_operations.Operation']"}) +        }, +        'archaeological_operations.relationtype': { +            'Meta': {'ordering': "('order',)", 'object_name': 'RelationType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'inverse_relation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_operations.RelationType']", 'null': 'True', 'blank': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'symmetrical': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_operations.remaintype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'RemainType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'archaeological_operations.reportstate': { +            'Meta': {'ordering': "('order',)", 'object_name': 'ReportState'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'auth.group': { +            'Meta': {'object_name': 'Group'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), +            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) +        }, +        'auth.permission': { +            'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, +            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) +        }, +        'auth.user': { +            'Meta': {'object_name': 'User'}, +            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), +            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), +            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), +            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), +            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), +            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), +            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), +            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) +        }, +        'contenttypes.contenttype': { +            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, +            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) +        }, +        'ishtar_common.arrondissement': { +            'Meta': {'object_name': 'Arrondissement'}, +            'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}) +        }, +        'ishtar_common.author': { +            'Meta': {'object_name': 'Author'}, +            'author_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.AuthorType']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'person': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'author'", 'to': "orm['ishtar_common.Person']"}) +        }, +        'ishtar_common.authortype': { +            'Meta': {'object_name': 'AuthorType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.canton': { +            'Meta': {'object_name': 'Canton'}, +            'arrondissement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Arrondissement']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}) +        }, +        'ishtar_common.department': { +            'Meta': {'ordering': "['number']", 'object_name': 'Department'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}), +            'number': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '3'}), +            'state': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.State']", 'null': 'True', 'blank': 'True'}) +        }, +        'ishtar_common.documenttemplate': { +            'Meta': {'ordering': "['associated_object_name', 'name']", 'object_name': 'DocumentTemplate'}, +            'associated_object_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'template': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}) +        }, +        'ishtar_common.format': { +            'Meta': {'object_name': 'Format'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.import': { +            'Meta': {'object_name': 'Import'}, +            'conservative_import': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), +            'encoding': ('django.db.models.fields.CharField', [], {'default': "'utf-8'", 'max_length': '15'}), +            'end_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), +            'error_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imported_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}), +            'imported_images': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'importer_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.ImporterType']"}), +            'match_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'result_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'seconds_remaining': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'skip_lines': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'state': ('django.db.models.fields.CharField', [], {'default': "'C'", 'max_length': '2'}), +            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.IshtarUser']"}) +        }, +        'ishtar_common.importertype': { +            'Meta': {'object_name': 'ImporterType'}, +            'associated_models': ('django.db.models.fields.CharField', [], {'max_length': '200'}), +            'description': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'is_template': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100', 'unique': 'True', 'null': 'True', 'blank': 'True'}), +            'unicity_keys': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), +            'users': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['ishtar_common.IshtarUser']", 'null': 'True', 'blank': 'True'}) +        }, +        'ishtar_common.ishtaruser': { +            'Meta': {'object_name': 'IshtarUser', '_ormbases': ['auth.User']}, +            'person': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ishtaruser'", 'unique': 'True', 'to': "orm['ishtar_common.Person']"}), +            'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}) +        }, +        'ishtar_common.operationtype': { +            'Meta': {'ordering': "['-preventive', 'order', 'label']", 'object_name': 'OperationType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'preventive': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.organization': { +            'Meta': {'object_name': 'Organization'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}), +            'exclude_from_merge': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_organization'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'merge_candidate': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_candidate_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), +            'merge_exclusion': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_exclusion_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), +            'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '300'}), +            'organization_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.OrganizationType']"}), +            'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}) +        }, +        'ishtar_common.organizationtype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'OrganizationType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.person': { +            'Meta': {'object_name': 'Person'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'attached_to': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'members'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}), +            'exclude_from_merge': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}), +            'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_person'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'merge_candidate': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_candidate_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), +            'merge_exclusion': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_exclusion_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), +            'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'person_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.PersonType']", 'symmetrical': 'False'}), +            'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'raw_name': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'surname': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), +            'title': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), +            'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}) +        }, +        'ishtar_common.persontype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'PersonType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.sourcetype': { +            'Meta': {'object_name': 'SourceType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.state': { +            'Meta': {'ordering': "['number']", 'object_name': 'State'}, +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}), +            'number': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '3'}) +        }, +        'ishtar_common.supporttype': { +            'Meta': {'object_name': 'SupportType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) +        }, +        'ishtar_common.town': { +            'Meta': {'ordering': "['numero_insee']", 'object_name': 'Town'}, +            'canton': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Canton']", 'null': 'True', 'blank': 'True'}), +            'center': ('django.contrib.gis.db.models.fields.PointField', [], {'srid': '27572', 'null': 'True', 'blank': 'True'}), +            'departement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'numero_insee': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '6'}), +            'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) +        } +    } + +    complete_apps = ['archaeological_operations']
\ No newline at end of file diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 795c1a805..448adcd68 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -1,6 +1,6 @@  #!/usr/bin/env python  # -*- coding: utf-8 -*- -# Copyright (C) 2012-2015 Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2012-2016 Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet>  # This program is free software: you can redistribute it and/or modify  # it under the terms of the GNU Affero General Public License as @@ -234,6 +234,7 @@ class Operation(BaseHistorizedItem, OwnPerms, ValueGetter, ShortMenuItem,      record_quality = models.CharField(          _(u"Record quality"), max_length=2, null=True, blank=True,          choices=QUALITY) +    abstract = models.TextField(_(u"Abstract"), null=True, blank=True)      history = HistoricalRecords()      class Meta: diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html index c0beac524..c45d6eb73 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation.html +++ b/archaeological_operations/templates/ishtar/sheet_operation.html @@ -57,9 +57,8 @@  {% if item.cost %}<p><label>{%trans "Cost:"%}</label> <span class='value'>{{ item.cost }} €{% if item.cost_by_m2 %}, ({{ item.cost_by_m2 }} €/m<sup>2</sup>){%endif%}</span></p>{%endif%}  {% if item.duration %}<p><label>{%trans "Duration:"%}</label> <span class='value'>{{ item.duration }} {%trans "Day"%}s</span></p>{%endif%} - -<p><label>{%trans "Remains:"%}</label> <span class='value'>{{ item.remains.all|join:", " }}</span></p> -<p><label>{%trans "Periods:"%}</label> <span class='value'>{{ item.periods.all|join:", " }}</span></p> +{% field_multiple "Remains" item.remains %} +{% field_multiple "Periods" item.periods %}  {% if item.QUALITY_DICT %}  {% field "Record quality" item.record_quality|from_dict:item.QUALITY_DICT %} @@ -68,6 +67,7 @@  {% field "Record quality" item.record_quality|from_dict:item.history_object.QUALITY_DICT %}  {% endif %} +{% field "Abstract" item.abstract %}  {% if item.associated_file %}  <p><label>{%trans "Associated file:"%}</label> <span class='value'><a href='#' onclick='load_window("{% url show-file item.associated_file.pk ''%}")'>{{ item.associated_file }}</a></span></p><!-- Displayed as Year/index/Commune/Common_name This should be a link to the file sheet of the related file --> diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py index 91ec1deb0..578382ccd 100644 --- a/archaeological_operations/tests.py +++ b/archaeological_operations/tests.py @@ -514,9 +514,9 @@ class OperationInitTest(object):  class OperationTest(TestCase, OperationInitTest):      fixtures = [settings.ROOT_PATH + -                '../fixtures/initial_data.json', +                '../fixtures/initial_data-auth-fr.json',                  settings.ROOT_PATH + -                '../ishtar_common/fixtures/initial_data.json', +                '../ishtar_common/fixtures/initial_data-fr.json',                  settings.ROOT_PATH +                  '../archaeological_files/fixtures/initial_data.json',                  settings.ROOT_PATH + @@ -544,6 +544,27 @@ class OperationTest(TestCase, OperationInitTest):                           {'operator': self.orgas[0].pk})          self.assertTrue(json.loads(response.content)['total'] == 2) +    def testRelatedSearch(self): +        c = Client() +        rel1 = models.RelationType.objects.create( +            symmetrical=True, label='Include', txt_idx='include') +        rel2 = models.RelationType.objects.create( +            symmetrical=False, label='Included', txt_idx='included', +            inverse_relation=rel1) +        models.RecordRelations.objects.create( +            left_record=self.operations[0], +            right_record=self.operations[1], +            relation_type=rel1) +        self.operations[1].year = 2011 +        self.operations[1].save() +        search = {'year': '2010', 'relation_types_0': rel2.pk} +        response = c.get(reverse('get-operation'), search) +        # no result when no authentification +        self.assertTrue(not json.loads(response.content)) +        c.login(username=self.username, password=self.password) +        response = c.get(reverse('get-operation'), search) +        self.assertTrue(json.loads(response.content)['total'] == 2) +      def testOwnSearch(self):          c = Client()          response = c.get(reverse('get-operation'), {'year': '2010'}) diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py index a10f63e88..9482f44b4 100644 --- a/archaeological_operations/views.py +++ b/archaeological_operations/views.py @@ -133,12 +133,15 @@ get_operation = get_item(      dated_fields=['start_date__lte', 'start_date__gte',                    'excavation_end_date__lte', 'excavation_end_date__gte'],      extra_request_keys={'common_name': 'common_name__icontains', +                        'abstract': 'abstract__icontains',                          'end_date': 'end_date__isnull',                          'year_index': ('year', 'operation_code'),                          'start_before': 'start_date__lte',                          'start_after': 'start_date__gte',                          'end_before': 'excavation_end_date__lte',                          'end_after': 'excavation_end_date__gte', +                        'towns__numero_insee__startswith': +                        'towns__numero_insee__startswith',                          'parcel_0': ('parcels__section',                                       'associated_file__parcels__section'),                          'parcel_1': ( @@ -146,6 +149,8 @@ get_operation = get_item(                              'associated_file__parcels__parcel_number'),                          'history_creator':                          'history_creator__ishtaruser__person__pk', +                        'archaeological_sites': +                        'archaeological_sites__pk',                          },  )  show_operation = show_item(models.Operation, 'operation') @@ -157,6 +162,10 @@ get_operationsource = get_item(      'get_operationsource', 'operationsource',      bool_fields=['duplicate'],      extra_request_keys={ +        'title': 'title__icontains', +        'description': 'description__icontains', +        'comment': 'comment__icontains', +        'additional_information': 'additional_information__icontains',          'operation__towns': 'operation__towns__pk',          'operation__operation_type': 'operation__operation_type__pk',          'operation__year': 'operation__year'}) @@ -216,6 +225,7 @@ wizard_steps = [      ('remains-operation_creation', RemainForm),      ('periods-operation_creation', PeriodForm),      ('relations-operation_creation', RecordRelationsFormSet), +    ('abstract-operation_creation', OperationFormAbstract),      ('final-operation_creation', FinalForm)]  if FILES_AVAILABLE:      wizard_steps.insert(0, ('filechoice-operation_creation', @@ -256,6 +266,7 @@ operation_modification_wizard = OperationModificationWizard.as_view([      ('remains-operation_modification', RemainForm),      ('periods-operation_modification', PeriodForm),      ('relations-operation_modification', RecordRelationsFormSet), +    ('abstract-operation_modification', OperationFormAbstract),      ('final-operation_modification', FinalForm)],      label=_(u"Operation modification"),      condition_dict={  | 
