diff options
Diffstat (limited to 'archaeological_operations')
| -rw-r--r-- | archaeological_operations/admin.py | 10 | ||||
| -rw-r--r-- | archaeological_operations/forms.py | 22 | ||||
| -rw-r--r-- | archaeological_operations/import_from_csv.py | 2 | ||||
| -rw-r--r-- | archaeological_operations/import_from_dbf.py | 2 | ||||
| -rw-r--r-- | archaeological_operations/ishtar_menu.py | 4 | ||||
| -rw-r--r-- | archaeological_operations/locale/django.pot | 580 | ||||
| -rwxr-xr-x | archaeological_operations/management/commands/import_operations_old.py | 2 | ||||
| -rw-r--r-- | archaeological_operations/migrations/0001_initial.py | 3 | ||||
| -rw-r--r-- | archaeological_operations/migrations/0063_auto__add_field_administrativeact_treatment_file__add_field_administra.py | 827 | ||||
| -rw-r--r-- | archaeological_operations/models.py | 63 | ||||
| -rw-r--r-- | archaeological_operations/templates/ishtar/sheet_administrativeact.html | 48 | ||||
| -rw-r--r-- | archaeological_operations/templates/ishtar/sheet_operation.html | 8 | ||||
| -rw-r--r-- | archaeological_operations/tests.py | 114 | ||||
| -rw-r--r-- | archaeological_operations/urls.py | 6 | ||||
| -rw-r--r-- | archaeological_operations/views.py | 36 | ||||
| -rw-r--r-- | archaeological_operations/wizards.py | 21 | 
16 files changed, 1361 insertions, 387 deletions
diff --git a/archaeological_operations/admin.py b/archaeological_operations/admin.py index 47ab8419b..b97df85eb 100644 --- a/archaeological_operations/admin.py +++ b/archaeological_operations/admin.py @@ -100,7 +100,15 @@ class RelationTypeAdmin(admin.ModelAdmin):  admin.site.register(models.RelationType, RelationTypeAdmin) -general_models = [models.RemainType, models.ActType, models.ReportState] + +class ActTypeAdmin(GeneralTypeAdmin): +    list_filter = ('intented_to',) +    list_display = ['label', 'txt_idx', 'available', 'intented_to'] + + +admin.site.register(models.ActType, ActTypeAdmin) + +general_models = [models.RemainType, models.ReportState]  for model in general_models:      admin.site.register(model, GeneralTypeAdmin) diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index 37c35f4be..f9f1095be 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -33,8 +33,8 @@ from django.forms.formsets import formset_factory, DELETION_FIELD_NAME, \  from django.utils.translation import ugettext_lazy as _, pgettext_lazy  from django.utils.safestring import mark_safe -from ishtar_common.models import valid_id, PersonType, Person, Town, \ -    DocumentTemplate, Organization, OrganizationType, get_current_profile, \ +from ishtar_common.models import valid_id, Person, Town, \ +    DocumentTemplate, Organization, get_current_profile, \      person_type_pks_lazy, person_type_pk_lazy, organization_type_pks_lazy, \      organization_type_pk_lazy @@ -515,7 +515,7 @@ class OperationSelect(TableSelect):                                            choices=[])      virtual_operation = forms.NullBooleanField(label=_(u"Virtual operation"))      archaeological_sites = forms.IntegerField( -        label=_("Archaelogical site"), +        label=_("Archaeological site"),          widget=widgets.JQueryAutoComplete(              reverse_lazy('autocomplete-archaeologicalsite'),              associated_model=models.ArchaeologicalSite), @@ -637,7 +637,7 @@ class OperationFormFileChoice(forms.Form):      associated_models = {'associated_file': File, }      currents = {'associated_file': File}      associated_file = forms.IntegerField( -        label=_(u"Archaelogical file"), +        label=_(u"Archaeological file"),          widget=widgets.JQueryAutoComplete(              reverse_lazy('autocomplete-file'), associated_model=File),          validators=[valid_id(File)], required=False) @@ -916,7 +916,7 @@ class OperationFormGeneral(ManageOldType, forms.Form):              msg = ''              if year and max_val:                  msg = _( -                    u"Operation code already exist for year: %(year)d - use a " +                    u"Operation code already exists for year: %(year)d - use a "                      u"value bigger than %(last_val)d") % {                      'year': year, 'last_val': max_val}              else: @@ -930,7 +930,7 @@ class OperationFormModifGeneral(OperationFormGeneral):                                          required=False)      currents = {'associated_file': File}      associated_file = forms.IntegerField( -        label=_(u"Archaelogical file"), +        label=_(u"Archaeological file"),          widget=widgets.JQueryAutoComplete(              reverse_lazy('autocomplete-file'),              associated_model=File), @@ -1143,7 +1143,7 @@ class ArchaeologicalSiteBasicForm(forms.Form):      base_model = 'archaeological_site'      associated_models = {'archaeological_site': models.ArchaeologicalSite}      archaeological_site = forms.IntegerField( -        label=_("Archaelogical site"), +        label=_("Archaeological site"),          widget=widgets.JQueryAutoComplete(              reverse_lazy('autocomplete-archaeologicalsite'),              associated_model=models.ArchaeologicalSite, @@ -1158,7 +1158,7 @@ ArchaeologicalSiteFormSet.form_label = _("Archaeological sites")  class ArchaeologicalSiteSelectionForm(forms.Form): -    form_label = _("Associated archaelogical sites") +    form_label = _("Associated archaeological sites")      archaeological_sites = forms.IntegerField(          widget=widgets.JQueryAutoComplete(              reverse_lazy('autocomplete-archaeologicalsite'), @@ -1377,7 +1377,7 @@ class AdministrativeActModifForm(object):              msg = ''              if year and max_val:                  msg = _( -                    u"This index already exist for year: %(year)d - use a " +                    u"This index already exists for year: %(year)d - use a "                      u"value bigger than %(last_val)d") % {                      'year': year, 'last_val': max_val}              else: @@ -1403,8 +1403,8 @@ class DocumentGenerationAdminActForm(forms.Form):      def __init__(self, *args, **kwargs):          self.document_type = 'O' -        if 'operation' in kwargs: -            self.document_type = 'O' if kwargs.pop('operation') else 'F' +        if 'document_type' in kwargs: +            self.document_type = kwargs.pop('document_type')          self.obj = None          if 'obj' in kwargs:              self.obj = kwargs.pop('obj') diff --git a/archaeological_operations/import_from_csv.py b/archaeological_operations/import_from_csv.py index 45faae632..999ada690 100644 --- a/archaeological_operations/import_from_csv.py +++ b/archaeological_operations/import_from_csv.py @@ -18,7 +18,7 @@  # See the file COPYING for details.  """ -Utils: import archaelogical operation from a CSV file +Utils: import archaeological operation from a CSV file  """  DELIMITER = ";" diff --git a/archaeological_operations/import_from_dbf.py b/archaeological_operations/import_from_dbf.py index 3ce41fdfc..fa452d605 100644 --- a/archaeological_operations/import_from_dbf.py +++ b/archaeological_operations/import_from_dbf.py @@ -18,7 +18,7 @@  # See the file COPYING for details.  """ -Utils: import archaelogical operation from a DBF file +Utils: import archaeological operation from a DBF file  """  from __future__ import unicode_literals diff --git a/archaeological_operations/ishtar_menu.py b/archaeological_operations/ishtar_menu.py index a0852147a..5f937f01c 100644 --- a/archaeological_operations/ishtar_menu.py +++ b/archaeological_operations/ishtar_menu.py @@ -66,7 +66,7 @@ MENU_SECTIONS = [                              'change_administrativeact']),                      MenuItem(                          'operation_administrativeactop', -                        _(u"Add"), +                        _(u"Creation"),                          model=models.AdministrativeAct,                          access_controls=['change_administrativeact']),                      MenuItem( @@ -94,7 +94,7 @@ MENU_SECTIONS = [                               access_controls=['view_operation',                                                'view_own_operation']),                      MenuItem('operation_source_creation', -                             _(u"Add"), +                             _(u"Creation"),                               model=models.OperationSource,                               access_controls=['change_operation',                                                'change_own_operation']), diff --git a/archaeological_operations/locale/django.pot b/archaeological_operations/locale/django.pot index 0e55c760b..5db1dc5d5 100644 --- a/archaeological_operations/locale/django.pot +++ b/archaeological_operations/locale/django.pot @@ -5,16 +5,17 @@  # Étienne Loks <etienne.loks@iggdrasil.net>, 2015. #zanata  # Valérie-Emma Leroux <emma@iggdrasil.net>, 2016. #zanata  # Étienne Loks <etienne.loks@iggdrasil.net>, 2016. #zanata +# Valérie-Emma Leroux <emma@iggdrasil.net>, 2017. #zanata  msgid ""  msgstr "" -#: forms.py:67 forms.py:369 forms.py:1004 forms.py:1026 forms.py:1030 -#: models.py:1168 templates/ishtar/sheet_operation.html:144 +#: forms.py:69 forms.py:371 forms.py:1009 forms.py:1031 forms.py:1035 +#: models.py:1213 templates/ishtar/sheet_operation.html:144  #: templates/ishtar/blocks/window_tables/parcels.html:10  msgid "Parcels"  msgstr "" -#: forms.py:70 forms.py:203 forms.py:980 models.py:1154 +#: forms.py:72 forms.py:205 forms.py:985 models.py:1199  #: templates/ishtar/blocks/window_tables/parcels.html:7  #: templates/ishtar/dashboards/dashboard_operation.html:432  #: templates/ishtar/dashboards/dashboard_operation.html:446 @@ -23,96 +24,96 @@ msgstr ""  msgid "Town"  msgstr "" -#: forms.py:72 forms.py:459 forms.py:755 forms.py:1250 models.py:249 -#: models.py:971 models.py:1152 +#: forms.py:74 forms.py:455 forms.py:752 forms.py:1255 models.py:271 +#: models.py:1005 models.py:1197  #: templates/ishtar/blocks/window_tables/parcels.html:8  msgid "Year"  msgstr "" -#: forms.py:75 models.py:1155 +#: forms.py:77 models.py:1200  #: templates/ishtar/blocks/window_tables/parcels.html:9  msgid "Section"  msgstr "" -#: forms.py:78 models.py:1157 +#: forms.py:80 models.py:1202  msgid "Parcel number"  msgstr "" -#: forms.py:80 models.py:1159 models.py:1176 models.py:1225 +#: forms.py:82 models.py:1204 models.py:1221 models.py:1270  msgid "Public domain"  msgstr "" -#: forms.py:124 +#: forms.py:126  msgid "Town section is required."  msgstr "" -#: forms.py:160 +#: forms.py:162  msgid "public domain"  msgstr "" -#: forms.py:167 +#: forms.py:169  msgid "Current parcels"  msgstr "" -#: forms.py:169 +#: forms.py:171  msgid "Deleted parcels"  msgstr "" -#: forms.py:206 +#: forms.py:208  msgid "Full text input"  msgstr "" -#: forms.py:208 +#: forms.py:210  msgid "example: \"2013: XD:1 to 13,24,33 to 39, YD:24\" or \"AB:24,AC:42\""  msgstr "" -#: forms.py:363 +#: forms.py:365  msgid "There are identical parcels."  msgstr "" -#: forms.py:378 +#: forms.py:380  msgid "Relation type"  msgstr "" -#: forms.py:381 ishtar_menu.py:30 models.py:344 models.py:804 models.py:834 -#: models.py:862 models.py:963 models.py:1151 wizards.py:339 wizards.py:350 +#: forms.py:383 ishtar_menu.py:30 models.py:366 models.py:826 models.py:856 +#: models.py:884 models.py:987 models.py:1196 wizards.py:344 wizards.py:355  #: templates/ishtar/sheet_operation.html:4  msgid "Operation"  msgstr "" -#: forms.py:401 +#: forms.py:403  msgid ":"  msgstr "" -#: forms.py:409 forms.py:608 forms.py:1215 +#: forms.py:411 forms.py:605 forms.py:1220  msgid "You should select an operation."  msgstr "" -#: forms.py:413 +#: forms.py:415  msgid "You should select a relation type."  msgstr "" -#: forms.py:443 +#: forms.py:445  msgid "Current relations"  msgstr "" -#: forms.py:445 +#: forms.py:447  msgid "Deleted relations"  msgstr "" -#: forms.py:449 templates/ishtar/sheet_operation.html:83 +#: forms.py:451 templates/ishtar/sheet_operation.html:83  msgid "Relations"  msgstr "" -#: forms.py:460 forms.py:1221 models.py:250 +#: forms.py:456 forms.py:1226 models.py:272  msgid "Numeric reference"  msgstr "" -#: forms.py:466 forms.py:1261 +#: forms.py:462 forms.py:1266  msgid "Parcel (section/number/public domain)"  msgstr "" -#: forms.py:469 forms.py:1264 models.py:805 +#: forms.py:465 forms.py:1269 models.py:827  #: templates/ishtar/dashboards/dashboard_operation.html:390  #: templates/ishtar/dashboards/dashboard_operation.html:411  #: templates/ishtar/dashboards/dashboard_operation.html:643 @@ -121,457 +122,454 @@ msgstr ""  msgid "Department"  msgstr "" -#: forms.py:470 forms.py:1092 models.py:85 +#: forms.py:466 forms.py:1097 models.py:85  #: templates/ishtar/blocks/window_tables/archaeologicalsites.html:8  msgid "Name"  msgstr "" -#: forms.py:472 forms.py:675 forms.py:753 forms.py:1227 models.py:257 +#: forms.py:468 forms.py:672 forms.py:750 forms.py:1232 models.py:279  msgid "Operation type"  msgstr "" -#: forms.py:474 +#: forms.py:470  msgid "Is open?"  msgstr "" -#: forms.py:483 forms.py:782 models.py:246 +#: forms.py:478 forms.py:782 models.py:268  msgid "In charge"  msgstr "" -#: forms.py:490 models.py:957 +#: forms.py:485 models.py:981  msgid "Scientist in charge"  msgstr "" -#: forms.py:492 forms.py:677 forms.py:773 models.py:244 +#: forms.py:487 forms.py:674 forms.py:772 models.py:266  msgid "Operator"  msgstr "" -#: forms.py:499 forms.py:1097 models.py:89 models.py:259 +#: forms.py:496 forms.py:1102 models.py:89 models.py:281  #: templates/ishtar/blocks/window_tables/archaeologicalsites.html:10  msgid "Remains"  msgstr "" -#: forms.py:500 forms.py:1075 forms.py:1094 models.py:87 models.py:265 +#: forms.py:497 forms.py:1080 forms.py:1099 models.py:87 models.py:287  #: templates/ishtar/blocks/window_tables/archaeologicalsites.html:9  msgid "Periods"  msgstr "" -#: forms.py:501 +#: forms.py:498  msgid "Started before"  msgstr "" -#: forms.py:503 +#: forms.py:500  msgid "Started after"  msgstr "" -#: forms.py:505 +#: forms.py:502  msgid "Ended before"  msgstr "" -#: forms.py:507 +#: forms.py:504  msgid "Ended after"  msgstr "" -#: forms.py:510 +#: forms.py:507  msgid "Search within relations"  msgstr "" -#: forms.py:512 forms.py:832 +#: forms.py:509 forms.py:837  msgid "Comment"  msgstr "" -#: forms.py:513 +#: forms.py:510  msgid "Abstract (full text search)"  msgstr "" -#: forms.py:515 forms.py:835 models.py:313 +#: forms.py:512 forms.py:840 models.py:335  msgid "Comment about scientific documentation"  msgstr "" -#: forms.py:516 forms.py:837 models.py:325 +#: forms.py:513 forms.py:842 models.py:347  msgid "Record quality"  msgstr "" -#: forms.py:517 forms.py:805 models.py:277 +#: forms.py:514 forms.py:807 models.py:299  msgid "Report processing"  msgstr "" -#: forms.py:519 forms.py:840 models.py:320 +#: forms.py:516 forms.py:845 models.py:342  msgid "Virtual operation"  msgstr "" -#: forms.py:521 forms.py:1141 -msgid "Archaelogical site" +#: forms.py:518 forms.py:1142 forms.py:1146 models.py:93 +msgid "Archaeological site"  msgstr "" -#: forms.py:527 forms.py:1268 +#: forms.py:524 forms.py:1273  msgid "Created by"  msgstr "" -#: forms.py:533 forms.py:1274 +#: forms.py:530 forms.py:1279  msgid "Modified by"  msgstr "" -#: forms.py:540 +#: forms.py:537  msgid "Documentation deadline before"  msgstr "" -#: forms.py:542 +#: forms.py:539  msgid "Documentation deadline after"  msgstr "" -#: forms.py:544 forms.py:825 models.py:332 +#: forms.py:541 forms.py:830 models.py:354  msgid "Documentation received"  msgstr "" -#: forms.py:546 +#: forms.py:543  msgid "Finds deadline before"  msgstr "" -#: forms.py:548 +#: forms.py:545  msgid "Finds deadline after"  msgstr "" -#: forms.py:550 forms.py:830 models.py:336 +#: forms.py:547 forms.py:835 models.py:358  msgid "Finds received"  msgstr "" -#: forms.py:595 forms.py:1213 views.py:168 +#: forms.py:592 forms.py:1218 views.py:168  msgid "Operation search"  msgstr "" -#: forms.py:639 +#: forms.py:636  msgid "Associated file"  msgstr "" -#: forms.py:643 forms.py:928 models.py:968 wizards.py:76 -msgid "Archaelogical file" +#: forms.py:640 forms.py:933 models.py:493 models.py:883 models.py:992 +#: wizards.py:80 +msgid "Archaeological file"  msgstr "" -#: forms.py:650 forms.py:652 models.py:327 +#: forms.py:647 forms.py:649 models.py:349  msgid "Abstract"  msgstr "" -#: forms.py:655 +#: forms.py:652  msgid "months"  msgstr "" -#: forms.py:655 +#: forms.py:652  msgid "years"  msgstr "" -#: forms.py:657 models.py:230 +#: forms.py:654 models.py:252  msgid "Creation date"  msgstr "" -#: forms.py:658 +#: forms.py:655  msgid "Start of field work"  msgstr "" -#: forms.py:660 +#: forms.py:657  msgid "All"  msgstr "" -#: forms.py:661 +#: forms.py:658  msgid "Preventive"  msgstr "" -#: forms.py:662 +#: forms.py:659  msgid "Research"  msgstr "" -#: forms.py:666 +#: forms.py:663  msgid "Slicing"  msgstr "" -#: forms.py:669 +#: forms.py:666  msgid "Department detail"  msgstr "" -#: forms.py:671 +#: forms.py:668  msgid "Date get from"  msgstr "" -#: forms.py:673 +#: forms.py:670  msgid "Preventive/Research"  msgstr "" -#: forms.py:679 +#: forms.py:676  msgid "Date after"  msgstr "" -#: forms.py:681 +#: forms.py:678  msgid "Date before"  msgstr "" -#: forms.py:683 +#: forms.py:680  msgid "With reports"  msgstr "" -#: forms.py:684 +#: forms.py:681  msgid "With finds"  msgstr "" -#: forms.py:736 forms.py:1322 templates/ishtar/sheet_administrativeact.html:13 +#: forms.py:733 forms.py:1327 templates/ishtar/sheet_administrativeact.html:20  #: templates/ishtar/sheet_operation.html:24  msgid "General"  msgstr "" -#: forms.py:751 models.py:310 +#: forms.py:748 models.py:332  msgid "Generic name"  msgstr "" -#: forms.py:760 models.py:279 +#: forms.py:757 models.py:301  msgid "Old code"  msgstr "" -#: forms.py:763 +#: forms.py:760  msgid "Head scientist"  msgstr "" -#: forms.py:779 models.py:309 +#: forms.py:779 models.py:331  msgid "Operator reference"  msgstr "" -#: forms.py:791 +#: forms.py:793  msgid "Total surface (m2)"  msgstr "" -#: forms.py:798 models.py:53 models.py:233 models.py:1341 +#: forms.py:800 models.py:53 models.py:255 models.py:1386  msgid "Start date"  msgstr "" -#: forms.py:800 models.py:235 +#: forms.py:802 models.py:257  msgid "Excavation end date"  msgstr "" -#: forms.py:803 models.py:236 +#: forms.py:805 models.py:258  msgid "Report delivery date"  msgstr "" -#: forms.py:822 models.py:329 +#: forms.py:827 models.py:351  msgid "Deadline for submission of the documentation"  msgstr "" -#: forms.py:827 models.py:334 +#: forms.py:832 models.py:356  msgid "Deadline for submission of the finds"  msgstr "" -#: forms.py:842 +#: forms.py:847  msgid "Image"  msgstr "" -#: forms.py:843 +#: forms.py:848  #, python-format  msgid ""  "<p>Heavy images are resized to: %(width)dx%(height)d (ratio is preserved).</"  "p>"  msgstr "" -#: forms.py:881 +#: forms.py:886  msgid ""  "If you want to set an excavation end date you have to provide a start date."  msgstr "" -#: forms.py:886 +#: forms.py:891  msgid "The excavation end date cannot be before the start date."  msgstr "" -#: forms.py:914 +#: forms.py:919  #, python-format  msgid "" -"Operation code already exist for year: %(year)d - use a value bigger than " +"Operation code already exists for year: %(year)d - use a value bigger than "  "%(last_val)d"  msgstr "" -#: forms.py:918 +#: forms.py:923  msgid "Bad operation code"  msgstr "" -#: forms.py:924 models.py:486 +#: forms.py:929 models.py:508  msgid "Operation code"  msgstr "" -#: forms.py:950 +#: forms.py:955  msgid "Preventive informations - excavation"  msgstr "" -#: forms.py:951 models.py:263 +#: forms.py:956 models.py:285  #: templates/ishtar/dashboards/dashboard_operation.html:701  msgid "Cost (euros)"  msgstr "" -#: forms.py:952 models.py:268 +#: forms.py:957 models.py:290  msgid "Scheduled man-days"  msgstr "" -#: forms.py:954 models.py:271 +#: forms.py:959 models.py:293  msgid "Optional man-days"  msgstr "" -#: forms.py:956 models.py:274 +#: forms.py:961 models.py:296  msgid "Effective man-days"  msgstr "" -#: forms.py:966 +#: forms.py:971  msgid "Preventive informations - diagnostic"  msgstr "" -#: forms.py:969 models.py:293 +#: forms.py:974 models.py:315  msgid "Prescription on zoning"  msgstr "" -#: forms.py:971 models.py:296 +#: forms.py:976 models.py:318  msgid "Prescription on large area"  msgstr "" -#: forms.py:974 models.py:298 +#: forms.py:979 models.py:320  msgid "Prescription on geoarchaeological context"  msgstr "" -#: forms.py:978 forms.py:1000 models.py:261 models.py:981 +#: forms.py:983 forms.py:1005 models.py:283 models.py:1015  msgid "Towns"  msgstr "" -#: forms.py:1007 models.py:1167 models.py:1339 +#: forms.py:1012 models.py:1212 models.py:1384  msgid "Parcel"  msgstr "" -#: forms.py:1059 models.py:45 +#: forms.py:1064 models.py:45  msgid "Remain types"  msgstr "" -#: forms.py:1063 models.py:44 +#: forms.py:1068 models.py:44  msgid "Remain type"  msgstr "" -#: forms.py:1079 templates/ishtar/sheet_operation.html:164 +#: forms.py:1084 templates/ishtar/sheet_operation.html:164  #: templates/ishtar/sheet_operation.html:195  msgid "Period"  msgstr "" -#: forms.py:1091 models.py:84 +#: forms.py:1096 models.py:84  msgid "Reference"  msgstr "" -#: forms.py:1120 +#: forms.py:1125  msgid "This reference already exists."  msgstr "" -#: forms.py:1137 models.py:93 -msgid "Archaeological site" -msgstr "" - -#: forms.py:1152 models.py:94 models.py:317 +#: forms.py:1157 models.py:94 models.py:339  #: templates/ishtar/sheet_operation.html:94  msgid "Archaeological sites"  msgstr "" -#: forms.py:1156 -msgid "Associated archaelogical sites" +#: forms.py:1161 +msgid "Associated archaeological sites"  msgstr "" -#: forms.py:1162 ishtar_menu.py:33 ishtar_menu.py:63 ishtar_menu.py:92 +#: forms.py:1167 ishtar_menu.py:33 ishtar_menu.py:63 ishtar_menu.py:92  msgid "Search"  msgstr "" -#: forms.py:1167 +#: forms.py:1172  msgid "Would you like to close this operation?"  msgstr "" -#: forms.py:1172 +#: forms.py:1177  msgid "Would you like to delete this operation?"  msgstr "" -#: forms.py:1181 forms.py:1251 forms.py:1387 models.py:836 models.py:948 +#: forms.py:1186 forms.py:1256 forms.py:1392 models.py:858 models.py:972  msgid "Index"  msgstr "" -#: forms.py:1207 +#: forms.py:1212  #, python-format  msgid ""  "Index already exists for operation: %(operation)s - use a value bigger than "  "%(last_val)d"  msgstr "" -#: forms.py:1219 +#: forms.py:1224  msgid "Operation's year"  msgstr "" -#: forms.py:1226 +#: forms.py:1231  msgid "Operation's town"  msgstr "" -#: forms.py:1239 +#: forms.py:1244  msgid "Documentation search"  msgstr "" -#: forms.py:1241 +#: forms.py:1246  msgid "You should select a document."  msgstr "" -#: forms.py:1258 forms.py:1325 models.py:873 models.py:942 +#: forms.py:1263 forms.py:1330 models.py:897 models.py:966  msgid "Act type"  msgstr "" -#: forms.py:1259 forms.py:1457 +#: forms.py:1264 forms.py:1462  msgid "Indexed?"  msgstr "" -#: forms.py:1265 forms.py:1330 models.py:972 +#: forms.py:1270 forms.py:1335 models.py:1006  #: templates/ishtar/blocks/window_tables/administrativacts.html:10  msgid "Object"  msgstr "" -#: forms.py:1302 views.py:324 +#: forms.py:1307 views.py:329  msgid "Administrative act search"  msgstr "" -#: forms.py:1317 forms.py:1415 forms.py:1482 +#: forms.py:1322 forms.py:1420 forms.py:1487  msgid "You should select an administrative act."  msgstr "" -#: forms.py:1333 models.py:969 +#: forms.py:1338 models.py:1003  msgid "Signature date"  msgstr "" -#: forms.py:1375 +#: forms.py:1380  #, python-format  msgid "" -"This index already exist for year: %(year)d - use a value bigger than " +"This index already exists for year: %(year)d - use a value bigger than "  "%(last_val)d"  msgstr "" -#: forms.py:1379 +#: forms.py:1384  msgid "Bad index"  msgstr "" -#: forms.py:1392 +#: forms.py:1397  msgid "Would you like to delete this administrative act?"  msgstr "" -#: forms.py:1397 +#: forms.py:1402  msgid "Template"  msgstr "" -#: forms.py:1421 forms.py:1425 +#: forms.py:1426 forms.py:1430  msgid "This document is not intended for this type of act."  msgstr "" -#: forms.py:1443 +#: forms.py:1448  msgid "Doc generation"  msgstr "" -#: forms.py:1445 +#: forms.py:1450  msgid "Generate the associated doc?"  msgstr "" -#: forms.py:1466 ishtar_menu.py:121 views.py:377 +#: forms.py:1471 ishtar_menu.py:121 views.py:382  msgctxt "admin act register"  msgid "Register"  msgstr "" -#: ishtar_menu.py:38 +#: ishtar_menu.py:38 ishtar_menu.py:69 ishtar_menu.py:97  msgid "Creation"  msgstr "" @@ -587,15 +585,11 @@ msgstr ""  msgid "Deletion"  msgstr "" -#: ishtar_menu.py:58 models.py:988 +#: ishtar_menu.py:58 models.py:1022  #: templates/ishtar/sheet_administrativeact.html:4  msgid "Administrative act"  msgstr "" -#: ishtar_menu.py:69 ishtar_menu.py:97 widgets.py:55 -msgid "Add" -msgstr "" -  #: ishtar_menu.py:84  msgid "Documents"  msgstr "" @@ -616,16 +610,16 @@ msgstr ""  msgid "General informations"  msgstr "" -#: ishtar_menu.py:136 models.py:345 +#: ishtar_menu.py:136 models.py:367  #: templates/ishtar/dashboards/dashboard_operation.html:8  msgid "Operations"  msgstr "" -#: models.py:52 models.py:70 models.py:1803 +#: models.py:52 models.py:70 models.py:1848  msgid "Order"  msgstr "" -#: models.py:54 models.py:1342 +#: models.py:54 models.py:1387  msgid "End date"  msgstr "" @@ -681,309 +675,369 @@ msgstr ""  msgid "Reliable"  msgstr "" +#: models.py:230 +msgid "Year - Index" +msgstr "" + +#: models.py:231 +msgid "Associated file (label)" +msgstr "" +  #: models.py:232 -msgid "Closing date" +msgid "Operator name" +msgstr "" + +#: models.py:233 +msgid "Scientist (full name)" +msgstr "" + +#: models.py:234 +msgid "Associated file (external ID)" +msgstr "" + +#: models.py:235 +msgid "Scientist (title)" +msgstr "" + +#: models.py:236 +msgid "Scientist (surname)" +msgstr "" + +#: models.py:237 +msgid "Scientist (name)" +msgstr "" + +#: models.py:238 +msgid "Scientist - Organization (name)"  msgstr ""  #: models.py:239 +msgid "In charge (title)" +msgstr "" + +#: models.py:240 +msgid "In charge (surname)" +msgstr "" + +#: models.py:241 +msgid "In charge (name)" +msgstr "" + +#: models.py:242 +msgid "In charge - Organization (name)" +msgstr "" + +#: models.py:247 +msgid "Archaeological sites (reference)" +msgstr "" + +#: models.py:254 +msgid "Closing date" +msgstr "" + +#: models.py:261  msgid "In charge scientist"  msgstr "" -#: models.py:254 models.py:1147 +#: models.py:276 models.py:1192  msgid "File"  msgstr "" -#: models.py:258 +#: models.py:280  msgid "Surface (m2)"  msgstr "" -#: models.py:311 +#: models.py:333  msgid "General comment"  msgstr "" -#: models.py:314 +#: models.py:336  msgid "Cached name"  msgstr "" -#: models.py:322 +#: models.py:344  msgid ""  "If checked, it means that this operation have not been officialy registered."  msgstr "" -#: models.py:338 +#: models.py:360  msgid "Point"  msgstr "" -#: models.py:339 +#: models.py:361  msgid "Multi polygon"  msgstr "" -#: models.py:347 +#: models.py:369  msgid "Can view all Operations"  msgstr "" -#: models.py:348 +#: models.py:370  msgid "Can view own Operation"  msgstr "" -#: models.py:349 +#: models.py:371  msgid "Can add own Operation"  msgstr "" -#: models.py:350 +#: models.py:372  msgid "Can change own Operation"  msgstr "" -#: models.py:351 +#: models.py:373  msgid "Can delete own Operation"  msgstr "" -#: models.py:352 +#: models.py:374  msgid "Can close Operation"  msgstr "" -#: models.py:380 +#: models.py:402  msgid "OPE"  msgstr "" -#: models.py:440 +#: models.py:462  msgid "Intercommunal"  msgstr "" -#: models.py:471 models.py:861 -msgid "Archaeological file" -msgstr "" - -#: models.py:472 +#: models.py:494  msgid "Code patriarche"  msgstr "" -#: models.py:512 +#: models.py:534  msgid "This operation code already exists for this year"  msgstr "" -#: models.py:545 +#: models.py:567  msgid "Number of parcels"  msgstr "" -#: models.py:563 +#: models.py:585  msgid "Number of administrative acts"  msgstr "" -#: models.py:571 +#: models.py:593  msgid "Number of indexed administrative acts"  msgstr "" -#: models.py:579 +#: models.py:601  msgid "Number of context records"  msgstr "" -#: models.py:615 +#: models.py:637  msgid "Number of finds"  msgstr "" -#: models.py:660 +#: models.py:682  msgid "No type"  msgstr "" -#: models.py:691 +#: models.py:713  msgid "Number of sources"  msgstr "" -#: models.py:733 templates/ishtar/dashboards/dashboard_operation.html:309 +#: models.py:755 templates/ishtar/dashboards/dashboard_operation.html:309  #: templates/ishtar/dashboards/dashboard_operation.html:575  #: templates/ishtar/dashboards/dashboard_operation.html:611  msgid "Mean"  msgstr "" -#: models.py:775 +#: models.py:797  msgid "Inverse relation"  msgstr "" -#: models.py:779 +#: models.py:801  msgid "Operation relation type"  msgstr "" -#: models.py:780 +#: models.py:802  msgid "Operation relation types"  msgstr "" -#: models.py:793 +#: models.py:815  msgid "Operation record relation"  msgstr "" -#: models.py:794 +#: models.py:816  msgid "Operation record relations"  msgstr "" -#: models.py:840 +#: models.py:862  msgid "Operation documentation"  msgstr "" -#: models.py:841 +#: models.py:863  msgid "Operation documentations"  msgstr "" -#: models.py:844 +#: models.py:866  msgid "Can view all Operation sources"  msgstr "" -#: models.py:846 +#: models.py:868  msgid "Can view own Operation source"  msgstr "" -#: models.py:848 +#: models.py:870  msgid "Can add own Operation source"  msgstr "" -#: models.py:850 +#: models.py:872  msgid "Can change own Operation source"  msgstr "" -#: models.py:852 +#: models.py:874  msgid "Can delete own Operation source"  msgstr "" -#: models.py:864 +#: models.py:885 models.py:997 +msgid "Treatment request" +msgstr "" + +#: models.py:886 models.py:1002 +msgid "Treatment" +msgstr "" + +#: models.py:888  msgid "Intended to"  msgstr "" -#: models.py:866 +#: models.py:890  msgid "Code"  msgstr "" -#: models.py:869 +#: models.py:893  msgid "Associated template"  msgstr "" -#: models.py:870 +#: models.py:894  msgid "Indexed"  msgstr "" -#: models.py:874 +#: models.py:898  msgid "Act types"  msgstr "" -#: models.py:946 +#: models.py:970  msgid "Person in charge of the operation"  msgstr "" -#: models.py:952 +#: models.py:976  msgid "Archaeological preventive operator"  msgstr "" -#: models.py:960 +#: models.py:984  msgid "Signatory"  msgstr "" -#: models.py:978 +#: models.py:1012  msgid "Departments"  msgstr "" -#: models.py:979 +#: models.py:1013  msgid "Cached values get from associated departments"  msgstr "" -#: models.py:982 +#: models.py:1016  msgid "Cached values get from associated towns"  msgstr "" -#: models.py:989 templates/ishtar/sheet_operation.html:102 +#: models.py:1023 templates/ishtar/sheet_operation.html:102  #: templates/ishtar/sheet_operation.html:138  msgid "Administrative acts"  msgstr "" -#: models.py:992 +#: models.py:1026  msgid "Can view all Administrative acts"  msgstr "" -#: models.py:994 +#: models.py:1028  msgid "Can view own Administrative act"  msgstr "" -#: models.py:996 +#: models.py:1030  msgid "Can add own Administrative act"  msgstr "" -#: models.py:998 +#: models.py:1032  msgid "Can change own Administrative act"  msgstr "" -#: models.py:1000 +#: models.py:1034  msgid "Can delete own Administrative act"  msgstr "" -#: models.py:1009 +#: models.py:1043  #: templates/ishtar/blocks/window_tables/administrativacts.html:7  #: templates/ishtar/blocks/window_tables/archaeologicalsites.html:7  msgid "Ref."  msgstr "" -#: models.py:1092 +#: models.py:1137  msgid "This index already exists for this year"  msgstr "" -#: models.py:1160 +#: models.py:1205  msgid "External ID"  msgstr "" -#: models.py:1163 +#: models.py:1208  msgid "External ID is set automatically"  msgstr "" -#: models.py:1164 +#: models.py:1209  msgid "Address - Locality"  msgstr "" -#: models.py:1337 +#: models.py:1382  msgid "Owner"  msgstr "" -#: models.py:1345 +#: models.py:1390  msgid "Parcel owner"  msgstr "" -#: models.py:1346 +#: models.py:1391  msgid "Parcel owners"  msgstr "" -#: models.py:1372 +#: models.py:1417  msgid "Recorded"  msgstr "" -#: models.py:1373 +#: models.py:1418  msgid "Effective"  msgstr "" -#: models.py:1374 +#: models.py:1419  msgid "Active"  msgstr "" -#: models.py:1375 +#: models.py:1420  msgid "Field completed"  msgstr "" -#: models.py:1376 +#: models.py:1421  msgid "Associated report"  msgstr "" -#: models.py:1377 +#: models.py:1422  msgid "Closed"  msgstr "" -#: models.py:1378 +#: models.py:1423  msgid "Documented and closed"  msgstr "" -#: models.py:1804 +#: models.py:1849  msgid "Is preventive"  msgstr "" -#: models.py:1807 +#: models.py:1852  msgid "Operation type old"  msgstr "" -#: models.py:1808 +#: models.py:1853  msgid "Operation types old"  msgstr "" @@ -999,93 +1053,53 @@ msgstr ""  msgid "Operation closing"  msgstr "" -#: views.py:282 +#: views.py:287  msgid "Operation deletion"  msgstr "" -#: views.py:287 +#: views.py:292  msgid "Operation: source search"  msgstr "" -#: views.py:295 +#: views.py:300  msgid "Operation: source creation"  msgstr "" -#: views.py:303 +#: views.py:308  msgid "Operation: source modification"  msgstr "" -#: views.py:318 +#: views.py:323  msgid "Operation: source deletion"  msgstr "" -#: views.py:337 +#: views.py:342  msgid "Operation: new administrative act"  msgstr "" -#: views.py:347 +#: views.py:352  msgid "Operation: administrative act modification"  msgstr "" -#: views.py:371 +#: views.py:376  msgid "Operation: administrative act deletion"  msgstr "" -#: wizards.py:199 -msgid "" -"Warning: No Archaelogical File is provided. If you have forget it return to " -"the first step." -msgstr "" - -#: templates/ishtar/sheet_administrativeact.html:14 -msgid "Year:" -msgstr "" - -#: templates/ishtar/sheet_administrativeact.html:15 -msgid "Numerical reference:" -msgstr "" - -#: templates/ishtar/sheet_administrativeact.html:16 -msgid "Internal reference:" -msgstr "" - -#: templates/ishtar/sheet_administrativeact.html:17 -msgid "Type:" -msgstr "" - -#: templates/ishtar/sheet_administrativeact.html:18 -msgid "Object:" -msgstr "" - -#: templates/ishtar/sheet_administrativeact.html:19 -msgid "Signature date:" -msgstr "" - -#: templates/ishtar/sheet_administrativeact.html:20 -msgid "In charge:" -msgstr "" - -#: templates/ishtar/sheet_administrativeact.html:21 -msgid "Archaeological preventive operator:" -msgstr "" - -#: templates/ishtar/sheet_administrativeact.html:23 -msgid "Associated file:" +#: widgets.py:55 +msgid "Add"  msgstr "" -#: templates/ishtar/sheet_administrativeact.html:24 -msgid "Associated operation:" +#: wizards.py:203 +msgid "" +"Warning: No Archaeological File is provided. If you have forget it return to " +"the first step."  msgstr "" -#: templates/ishtar/sheet_administrativeact.html:26 +#: templates/ishtar/sheet_administrativeact.html:36  #: templates/ishtar/sheet_operation.html:38  msgid "Surface:"  msgstr "" -#: templates/ishtar/sheet_administrativeact.html:27 -msgid "Created by:" -msgstr "" -  #: templates/ishtar/sheet_operation.html:14  msgid "This operation is virtual."  msgstr "" diff --git a/archaeological_operations/management/commands/import_operations_old.py b/archaeological_operations/management/commands/import_operations_old.py index a9ecf41c9..4ad229e9a 100755 --- a/archaeological_operations/management/commands/import_operations_old.py +++ b/archaeological_operations/management/commands/import_operations_old.py @@ -29,7 +29,7 @@ IMPORTERS = {'csv':import_from_csv,  class Command(BaseCommand):      args = '<filename> [<lines>]' -    help = "Import archaelogical operations" +    help = "Import archaeological operations"      def handle(self, *args, **options):          if not args or not args[0]: diff --git a/archaeological_operations/migrations/0001_initial.py b/archaeological_operations/migrations/0001_initial.py index 6e4b66ce6..4172b9beb 100644 --- a/archaeological_operations/migrations/0001_initial.py +++ b/archaeological_operations/migrations/0001_initial.py @@ -6,6 +6,7 @@ from django.db import models  class Migration(SchemaMigration): +    depends_on = (('archaeological_files', '0001_initial.py'), )      def forwards(self, orm):          # Adding model 'RemainType' @@ -1056,4 +1057,4 @@ class Migration(SchemaMigration):          }      } -    complete_apps = ['archaeological_operations']
\ No newline at end of file +    complete_apps = ['archaeological_operations'] diff --git a/archaeological_operations/migrations/0063_auto__add_field_administrativeact_treatment_file__add_field_administra.py b/archaeological_operations/migrations/0063_auto__add_field_administrativeact_treatment_file__add_field_administra.py new file mode 100644 index 000000000..9ceffa8a3 --- /dev/null +++ b/archaeological_operations/migrations/0063_auto__add_field_administrativeact_treatment_file__add_field_administra.py @@ -0,0 +1,827 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + +    depends_on = ( +        ('archaeological_finds', +         '0069_auto__add_field_historicaltreatment_file_id__add_field_treatment_file'), +    ) + +    def forwards(self, orm): +        # Adding field 'AdministrativeAct.treatment_file' +        db.add_column('archaeological_operations_administrativeact', 'treatment_file', +                      self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='administrative_act', null=True, to=orm['archaeological_finds.TreatmentFile']), +                      keep_default=False) + +        # Adding field 'AdministrativeAct.treatment' +        db.add_column('archaeological_operations_administrativeact', 'treatment', +                      self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='administrative_act', null=True, to=orm['archaeological_finds.Treatment']), +                      keep_default=False) + + +        # Changing field 'ActType.intented_to' +        db.alter_column('archaeological_operations_acttype', 'intented_to', self.gf('django.db.models.fields.CharField')(max_length=2)) +        # Adding field 'HistoricalAdministrativeAct.treatment_file_id' +        db.add_column('archaeological_operations_historicaladministrativeact', 'treatment_file_id', +                      self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True), +                      keep_default=False) + +        # Adding field 'HistoricalAdministrativeAct.treatment_id' +        db.add_column('archaeological_operations_historicaladministrativeact', 'treatment_id', +                      self.gf('django.db.models.fields.IntegerField')(db_index=True, null=True, blank=True), +                      keep_default=False) + + +    def backwards(self, orm): +        # Deleting field 'AdministrativeAct.treatment_file' +        db.delete_column('archaeological_operations_administrativeact', 'treatment_file_id') + +        # Deleting field 'AdministrativeAct.treatment' +        db.delete_column('archaeological_operations_administrativeact', 'treatment_id') + + +        # Changing field 'ActType.intented_to' +        db.alter_column('archaeological_operations_acttype', 'intented_to', self.gf('django.db.models.fields.CharField')(max_length=1)) +        # Deleting field 'HistoricalAdministrativeAct.treatment_file_id' +        db.delete_column('archaeological_operations_historicaladministrativeact', 'treatment_file_id') + +        # Deleting field 'HistoricalAdministrativeAct.treatment_id' +        db.delete_column('archaeological_operations_historicaladministrativeact', 'treatment_id') + + +    models = { +        'archaeological_files.file': { +            'Meta': {'ordering': "('cached_label',)", 'object_name': 'File'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            '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.FloatField', [], {'null': 'True', 'blank': 'True'}), +            'total_surface': ('django.db.models.fields.FloatField', [], {'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_finds.treatment': { +            'Meta': {'unique_together': "(('year', 'index'),)", 'object_name': 'Treatment'}, +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'container': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Container']", 'null': 'True', 'blank': 'True'}), +            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'external_id': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatments'", 'null': 'True', 'to': "orm['archaeological_finds.TreatmentFile']"}), +            'goal': ('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'}), +            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_archaeological_finds_treatment'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'index': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'location': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Warehouse']", 'null': 'True', 'blank': 'True'}), +            'organization': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatments'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}), +            'other_reference': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'person': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatments'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'target_is_basket': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'treatment_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_finds.TreatmentType']", 'symmetrical': 'False'}), +            'year': ('django.db.models.fields.IntegerField', [], {'default': '2016'}) +        }, +        'archaeological_finds.treatmentfile': { +            'Meta': {'ordering': "('cached_label',)", 'unique_together': "(('year', 'index'),)", 'object_name': 'TreatmentFile'}, +            'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'creation_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today', 'null': 'True', 'blank': 'True'}), +            'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'external_id': ('django.db.models.fields.CharField', [], {'max_length': '200', '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_finds_treatmentfile'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatmentfile_responsability'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'index': ('django.db.models.fields.IntegerField', [], {'default': '1'}), +            'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.TreatmentFileType']"}), +            'year': ('django.db.models.fields.IntegerField', [], {'default': '2016'}) +        }, +        'archaeological_finds.treatmentfiletype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'TreatmentFileType'}, +            '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_finds.treatmenttype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'TreatmentType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'downstream_is_many': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            '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'}), +            'upstream_is_many': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'virtual': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) +        }, +        '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': '2'}), +            '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'}), +            'treatment': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_finds.Treatment']"}), +            'treatment_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'administrative_act'", 'null': 'True', 'to': "orm['archaeological_finds.TreatmentFile']"}), +            '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'}), +            'treatment_file_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), +            'treatment_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', '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_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'}), +            'documentation_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'documentation_received': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            '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'}), +            'finds_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'finds_received': ('django.db.models.fields.NullBooleanField', [], {'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'}), +            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': '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'}), +            'multi_polygon': ('django.contrib.gis.db.models.fields.MultiPolygonField', [], {'null': 'True', 'blank': 'True'}), +            'negative_result': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'old_code': ('django.db.models.fields.CharField', [], {'max_length': '200', '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'}), +            'point': ('django.contrib.gis.db.models.fields.PointField', [], {'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'}), +            'scientific_documentation_comment': ('django.db.models.fields.TextField', [], {'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'}), +            'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', '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_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'}), +            'documentation_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'documentation_received': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            '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'}), +            'finds_deadline': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), +            'finds_received': ('django.db.models.fields.NullBooleanField', [], {'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'}), +            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': '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'}), +            'multi_polygon': ('django.contrib.gis.db.models.fields.MultiPolygonField', [], {'null': 'True', 'blank': 'True'}), +            'negative_result': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), +            'old_code': ('django.db.models.fields.CharField', [], {'max_length': '200', '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'}), +            'point': ('django.contrib.gis.db.models.fields.PointField', [], {'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'}), +            'scientific_documentation_comment': ('django.db.models.fields.TextField', [], {'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'}), +            'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), +            'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'operations'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), +            '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'}), +            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': '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'}), +            'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', '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']"}), +            'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            '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'}), +            'public_domain': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'section': ('django.db.models.fields.CharField', [], {'max_length': '4', 'null': 'True', 'blank': 'True'}), +            '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', 'label')", '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'}), +            'tiny_label': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), +            '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'}) +        }, +        'archaeological_warehouse.container': { +            'Meta': {'object_name': 'Container'}, +            'comment': ('django.db.models.fields.TextField', [], {}), +            'container_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.ContainerType']"}), +            '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_warehouse_container'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'location': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Warehouse']"}), +            'reference': ('django.db.models.fields.CharField', [], {'max_length': '40'}) +        }, +        'archaeological_warehouse.containertype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'ContainerType'}, +            'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'height': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), +            'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), +            'length': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'reference': ('django.db.models.fields.CharField', [], {'max_length': '30'}), +            'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), +            'volume': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), +            'width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) +        }, +        'archaeological_warehouse.warehouse': { +            'Meta': {'object_name': 'Warehouse'}, +            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), +            'comment': ('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': '300', '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_warehouse_warehouse'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'name': ('django.db.models.fields.CharField', [], {'max_length': '40'}), +            'person_in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'warehouse_in_charge'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}), +            'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), +            'warehouse_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.WarehouseType']"}) +        }, +        'archaeological_warehouse.warehousetype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'WarehouseType'}, +            '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'}) +        }, +        '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']}, +            'advanced_shortcut_menu': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            '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'}), +            'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), +            'archived': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', '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': '300', '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': '500'}), +            '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'}), +            'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'raw_phone': ('django.db.models.fields.TextField', [], {'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'}), +            'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), +            'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), +            'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), +            'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}), +            'archived': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', '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']"}), +            'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'contact_type': ('django.db.models.fields.CharField', [], {'max_length': '300', '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': '300', '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'}), +            'old_title': ('django.db.models.fields.CharField', [], {'max_length': '100', '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'}), +            'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), +            'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}), +            'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', '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'}), +            'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), +            'salutation': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), +            'surname': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), +            'title': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.TitleType']", '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.titletype': { +            'Meta': {'ordering': "('label',)", 'object_name': 'TitleType'}, +            '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'}), +            'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_town'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}), +            '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'] diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 14e5e1f7e..129040706 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -225,6 +225,28 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms,          'finds_deadline_before': 'finds_deadline__lte',          'finds_deadline_after': 'finds_deadline__gte',      } +    EXTRA_FULL_FIELDS_LABELS = { +        'full_code_patriarche': u"Code patriarche", +        'year_index': _(u"Year - Index"), +        'associated_file_short_label': _(u"Associated file (label)"), +        'operator__name': _(u"Operator name"), +        'scientist__raw_name': _(u"Scientist (full name)"), +        'associated_file__external_id': _(u"Associated file (external ID)"), +        'scientist__title': _(u"Scientist (title)"), +        'scientist__surname': _(u"Scientist (surname)"), +        'scientist__name': _(u"Scientist (name)"), +        'scientist__attached_to__name': _(u"Scientist - Organization (name)"), +        'in_charge__title': _(u"In charge (title)"), +        'in_charge__surname': _(u"In charge (surname)"), +        'in_charge__name': _(u"In charge (name)"), +        'in_charge__attached_to__name': _(u"In charge - Organization (name)"), +        'cira_rapporteur__surname': u"Rapporteur CIRA (prénom)", +        'cira_rapporteur__name': u"Rapporteur CIRA (nom)", +        'cira_rapporteur__attached_to__name': u"Rapporteur CIRA - " +                                              u"Organisation (nom)", +        'archaeological_sites__reference': _(u"Archaeological sites (" +                                             u"reference)"), +    }      # fields definition      creation_date = models.DateField(_(u"Creation date"), @@ -355,9 +377,9 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms,      @classmethod      def get_owns(cls, user, menu_filtr=None, limit=None): -        replace_query = {} -        if menu_filtr: -            replace_query = {'associated_file': menu_filtr} +        replace_query = None +        if menu_filtr and 'file' in menu_filtr: +            replace_query = Q(associated_file=menu_filtr['file'])          owns = super(Operation, cls).get_owns(              user, replace_query=replace_query,              limit=limit) @@ -798,9 +820,9 @@ post_delete.connect(post_delete_record_relation, sender=RecordRelations)  class OperationByDepartment(models.Model): -    ''' +    """      Database view for dashboard -    ''' +    """      operation = models.ForeignKey(Operation, verbose_name=_(u"Operation"))      department = models.ForeignKey(Department, verbose_name=_(u"Department"),                                     blank=True, null=True) @@ -860,8 +882,10 @@ class OperationSource(Source):  class ActType(GeneralType):      TYPE = (('F', _(u'Archaeological file')),              ('O', _(u'Operation')), +            ('TF', _(u'Treatment request')), +            ('T', _(u'Treatment')),              ) -    intented_to = models.CharField(_(u"Intended to"), max_length=1, +    intented_to = models.CharField(_(u"Intended to"), max_length=2,                                     choices=TYPE)      code = models.CharField(_(u"Code"), max_length=10, blank=True, null=True)      associated_template = models.ManyToManyField( @@ -965,7 +989,17 @@ class AdministrativeAct(BaseHistorizedItem, OwnPerms, ValueGetter):          'archaeological_files.File',          blank=True, null=True,          related_name='administrative_act', -        verbose_name=_(u"Archaelogical file")) +        verbose_name=_(u"Archaeological file")) +    treatment_file = models.ForeignKey( +        'archaeological_finds.TreatmentFile', +        blank=True, null=True, +        related_name='administrative_act', +        verbose_name=_(u"Treatment request")) +    treatment = models.ForeignKey( +        'archaeological_finds.Treatment', +        blank=True, null=True, +        related_name='administrative_act', +        verbose_name=_(u"Treatment"))      signature_date = models.DateField(_(u"Signature date"), blank=True,                                        null=True)      year = models.IntegerField(_(u"Year"), blank=True, null=True) @@ -1003,7 +1037,7 @@ class AdministrativeAct(BaseHistorizedItem, OwnPerms, ValueGetter):      def __unicode__(self):          return settings.JOINT.join(              [unicode(item) for item in [ -                self.operation, self.associated_file, self.act_object] +                self.related_item, self.act_object]               if item])      full_ref_lbl = _(u"Ref.") @@ -1020,6 +1054,10 @@ class AdministrativeAct(BaseHistorizedItem, OwnPerms, ValueGetter):          return u" ".join(lbl)      @property +    def associated_filename(self): +        return self.get_filename() + +    @property      def towns(self):          if self.associated_file:              return self.associated_file.towns.all() @@ -1047,7 +1085,14 @@ class AdministrativeAct(BaseHistorizedItem, OwnPerms, ValueGetter):      @property      def related_item(self): -        return self.operation if self.operation else self.associated_file +        if self.operation: +            return self.operation +        if self.associated_file: +            return self.associated_file +        if self.treatment: +            return self.treatment +        if self.treatment_file: +            return self.treatment_file      def get_filename(self):          filename = self.related_item.associated_filename diff --git a/archaeological_operations/templates/ishtar/sheet_administrativeact.html b/archaeological_operations/templates/ishtar/sheet_administrativeact.html index 57acf9cbe..b12c1f8c0 100644 --- a/archaeological_operations/templates/ishtar/sheet_administrativeact.html +++ b/archaeological_operations/templates/ishtar/sheet_administrativeact.html @@ -1,32 +1,46 @@  {% extends "ishtar/sheet.html" %} -{% load i18n window_header %} +{% load i18n window_header window_field %}  {% block head_title %}{% trans "Administrative act" %}{% endblock %}  {% block content %}  {% if item.operation %}  {% window_nav item window_id 'show-administrativeact' 'operation_administrativeactop_modify' %} -{% else %} +{% endif %} +{% if item.associated_file %}  {% window_nav item window_id 'show-administrativeact' 'file_administrativeactfile_modify' %}  {% endif %} +{% if item.treatment %} +{% window_nav item window_id 'show-administrativeact' 'treatment_administrativeacttreatment_modify' %} +{% endif %} +{% if item.treatment_file %} +{% window_nav item window_id 'show-administrativeact' 'treatmentfile_administrativeacttreatmentfile_modify' %} +{% endif %}  <h3>{% trans "General"%}</h3> -<p><label>{%trans "Year:"%}</label> <span class='value strong'>{{ item.year }}</span></p> -{% if item.index %}<p><label>{%trans "Numerical reference:"%}</label> <span class='value strong'>{{ item.index }}</span></p>{% endif %} -{% if item.ref_sra %}<p><label>{%trans "Internal reference:"%}</label> <span class='value strong'>{{ item.ref_sra }}</span></p>{% endif %} -<p><label>{%trans "Type:"%}</label> <span class='value'>{{ item.act_type }}</span></p> -{% if item.act_object %}<p><label>{%trans "Object:"%}</label> <span class='value'>{{ item.act_object }}</span></p>{% endif %} -<p><label>{%trans "Signature date:"%}</label> <span class='value'>{{ item.signature_date }}</span></p> -<p><label>{%trans "In charge:"%}</label> <span class='value'>{{ item.in_charge.full_label }}</span></p> -{% if item.operator %}<p><label>{%trans "Archaeological preventive operator:"%}</label> <span class='value'>{{ item.operator }}</span></p>{% endif %} - -{% 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>{% endif %} <!-- Displayed as Year/index/Commune/Common_name This should be a link to the file sheet of the related file --> -{% if item.operation %}<p><label>{%trans "Associated operation:"%}</label> <span class='value'><a href='#' onclick='load_window("{% url show-operation item.operation.pk ''%}")'>{{ item.operation }}</a></span></p>{% endif %} <!-- Displayed as Year/index/Commune/Common_name This should be a link to the file sheet of the related operation --> +<ul class='form-flex'> +    {% field_li "Year" item.year %} +    {% field_li "Index" item.index %} +    {% field_li "Internal reference" item.ref_sra %} +    {% field_li "Type" item.act_type %} +    {% field_li "Object" item.act_object %} +    {% field_li "Signature date" item.signature_date %} +    {% field_li "In charge" item.in_charge %} +    {% field_li "Archaeological preventive operator" item.operator %} +    {% field_li_detail "Associated file" item.associated_file %} +    {% field_li_detail "Operation" item.operation %} +    {% field_li_detail "Treatment" item.treatment %} +    {% field_li_detail "Treatment request" item.treatment_file %} -{% if item.operation %}{% if item.operation.surface %}<p><label>{%trans "Surface:"%}</label> <span class='value'>{{ item.operation.surface }} m<sup>2</sup> ({{ item.operation.surface_ha }} ha)</span></p>{%endif%} {% endif %} -<p><label>{%trans "Created by:"%}</label> <span class='value'>{{ item.history_creator.ishtaruser.full_label }}</span></p> -{%comment%}{% if item.general_contractor.attached_to %}<p><label>{%trans "General contractor organisation:"%}</label> <span class='value'>{{ item.general_contractor.attached_to }}</span></p>{% endif %} <!-- Contractor's organisation displayed as concat of Name/Adress/postal_code/city --> +    {% if item.operation and item.operation.surface %} +    <li><label>{% trans "Surface:"%}</label> <span class='value'>{{ item.operation.surface }} m<sup>2</sup> ({{ item.operation.surface_ha }} ha)</span></li> +    {% endif %} +    {% field_li "Created by" item.history_creator.ishtaruser %} +{% comment %}{% if item.general_contractor.attached_to %}<p> +    <label>{% trans "General contractor organisation:"%}</label> +    <span class='value'>{{ item.general_contractor.attached_to }}</span></p>{% endif %} <!-- Contractor's organisation displayed as concat of Name/Adress/postal_code/city -->  {% if item.general_contractor %}<p><label>{%trans "General contractor:"%}</label> <span class='value'>{{ item.general_contractor.full_label }}</span></p>{% endif %} -{%endcomment%} +{% endcomment %} +</ul>  {% endblock %} diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html index daddb42d6..43446c516 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation.html +++ b/archaeological_operations/templates/ishtar/sheet_operation.html @@ -49,11 +49,11 @@  {% field_li "Deadline for submission of the finds" item.finds_deadline %}  {% field_li "Finds received" item.finds_received %}  {% field_li_detail "Associated file" item.associated_file %} -{% field_li "Responsible for town planning service" item.associated_file.responsible_town_planning_service.full_address %} +{% field_li "Responsible for planning service" item.associated_file.responsible_town_planning_service.full_address %}  {% if item.associated_file.town_planning_service %} -  {% field_li "Town planning service organization" item.associated_file.town_planning_service.full_address %} +  {% field_li "Planning service organization" item.associated_file.town_planning_service.full_address %}  {% else %} -  {% field_li "Town planning service organization" item.associated_file.responsible_town_planning_service.attached_to.full_address %} +  {% field_li "Planning service organization" item.associated_file.responsible_town_planning_service.attached_to.full_address %}  {% endif %}  {% field_li "Permit type" item.associated_file.permit_type %}  {% field_li "Permit reference" item.associated_file.permit_reference %} @@ -115,7 +115,7 @@  {% trans "Context record relations" as cr_rels %}  {% if item.context_record_relations_q.count %} -{% dynamic_table_document cr_rels 'context_records_relations' 'left_record__operation' item.pk '' output %} +{% dynamic_table_document cr_rels 'context_records_relations_detail' 'left_record__operation' item.pk '' output %}  {% endif %}  {% trans "Documents from associated context records" as cr_docs %} diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py index dd294550e..d8399eedb 100644 --- a/archaeological_operations/tests.py +++ b/archaeological_operations/tests.py @@ -38,7 +38,8 @@ from ishtar_common.models import OrganizationType, Organization, \      ImporterType, IshtarUser, TargetKey, IshtarSiteProfile  from ishtar_common import forms_common -from ishtar_common.tests import WizardTest, create_superuser, create_user +from ishtar_common.tests import WizardTest, WizardTestFormData as FormData, \ +    create_superuser, create_user  class ImportOperationTest(TestCase): @@ -481,7 +482,9 @@ class OperationInitTest(object):          self.parcels.append(models.Parcel.objects.create(**default))          return self.parcels -    def get_default_parcel(self): +    def get_default_parcel(self, force=False): +        if force: +            return self.create_parcel()[-1]          return self.create_parcel()[0]      def create_operation(self, user=None, orga=None): @@ -495,6 +498,8 @@ class OperationInitTest(object):          return self.operations      def get_default_operation(self, force=False): +        if force: +            return self.create_operation()[-1]          return self.create_operation()[0]      def tearDown(self): @@ -668,20 +673,20 @@ class OperationWizardCreationTest(WizardTest, OperationInitTest, TestCase):      url_name = 'operation_creation'      wizard_name = 'operation_wizard'      steps = views.wizard_steps -    form_datas = [( -        # data -        { -            'general-operation_creation': { -                'operation_type': 1,  # preventive diag -                'year': 2016} -        }, -        # ignored -        ('filechoice-operation_creation', -         'preventive-operation_creation', -         'towns-operation_creation', -         'parcels-operation_creation', -         ) -    )] +    form_datas = [ +        FormData( +            "Create a preventive diag", +            form_datas={ +                'general-operation_creation': { +                    'operation_type': 1,  # preventive diag +                    'year': 2016} +            }, +            ignored=('filechoice-operation_creation', +                     'preventive-operation_creation', +                     'towns-operation_creation', +                     'parcels-operation_creation', ) +        ) +    ]      def pre_wizard(self):          self.operation_number = models.Operation.objects.count() @@ -692,20 +697,56 @@ class OperationWizardCreationTest(WizardTest, OperationInitTest, TestCase):                           self.operation_number + 1) +class OperationWizardDeleteTest(OperationWizardCreationTest): +    fixtures = OperationWizardCreationTest.fixtures +    url_name = 'operation_deletion' +    wizard_name = 'operation_deletion_wizard' +    steps = views.operation_deletion_steps +    form_datas = [ +        FormData( +            "Wizard deletion test", +            form_datas={ +                'selec-operation_deletion': {'pk': None}, +            } +        ) +    ] + +    def pass_test(self): +        if not settings.SOUTH_TESTS_MIGRATE: +            # with no migration the views are not created +            return True + +    def pre_wizard(self): +        self.ope = self.get_default_operation(force=True) +        self.form_datas[0].form_datas['selec-operation_deletion']['pk'] = \ +            self.ope.pk +        self.operation_number = models.Operation.objects.count() +        super(OperationWizardDeleteTest, self).pre_wizard() + +    def post_wizard(self): +        self.assertEqual(self.operation_number - 1, +                         models.Operation.objects.count()) + +  class OperationWizardClosingTest(OperationWizardCreationTest):      fixtures = OperationWizardCreationTest.fixtures      url_name = 'operation_closing'      wizard_name = 'operation_closing_wizard'      steps = views.operation_closing_steps -    form_datas = [[ -        { -            'selec-operation_closing': {'pk': None}, -            'date-operation_closing': {'end_date': '2016-01-01'}, -        }, []]] +    form_datas = [ +        FormData( +            "Wizard closing test", +            form_datas={ +                'selec-operation_closing': {'pk': None}, +                'date-operation_closing': {'end_date': '2016-01-01'}, +            } +        ) +    ]      def pre_wizard(self):          self.ope = self.get_default_operation() -        self.form_datas[0][0]['selec-operation_closing']['pk'] = self.ope.pk +        self.form_datas[0].form_datas['selec-operation_closing']['pk'] = \ +            self.ope.pk          self.assertTrue(self.ope.is_active())          super(OperationWizardClosingTest, self).pre_wizard() @@ -714,7 +755,7 @@ class OperationWizardClosingTest(OperationWizardCreationTest):          self.assertFalse(ope.is_active())          self.assertEqual(              ope.closing()['date'].strftime('%Y-%d-%m'), -            self.form_datas[0][0]['date-operation_closing']['end_date']) +            self.form_datas[0].form_datas['date-operation_closing']['end_date'])  class OperationAdminActWizardCreationTest(WizardTest, OperationInitTest, @@ -730,25 +771,24 @@ class OperationAdminActWizardCreationTest(WizardTest, OperationInitTest,      url_name = 'operation_administrativeactop'      wizard_name = 'operation_administrative_act_wizard'      steps = views.administrativeactop_steps -    form_datas = [[ -        # data -        { -            'selec-operation_administrativeactop': { -            }, -            'administrativeact-operation_administrativeactop': { -                'signature_date': str(datetime.date.today()) -            } -        }, -        # ignored -        [] -    ]] +    form_datas = [ +        FormData( +            "Admin act creation", +            form_datas={ +                    'selec-operation_administrativeactop': { +                    }, +                    'administrativeact-operation_administrativeactop': { +                        'signature_date': str(datetime.date.today()) +                    } +                }, +        ) +    ]      def pre_wizard(self):          ope = self.get_default_operation() -          self.number = models.AdministrativeAct.objects.count() -        data = self.form_datas[0][0] +        data = self.form_datas[0].form_datas          data['selec-operation_administrativeactop']['pk'] = ope.pk          act = models.ActType.objects.filter(intented_to='O').all()[0].pk diff --git a/archaeological_operations/urls.py b/archaeological_operations/urls.py index aca98d4c4..e98ddc93f 100644 --- a/archaeological_operations/urls.py +++ b/archaeological_operations/urls.py @@ -128,9 +128,13 @@ urlpatterns += patterns(      # allow specialization for operations      url(r'show-administrativeact(?:/(?P<pk>.+))?/(?P<type>.+)?$',          'show_administrativeact', name='show-administrativeactop'), -    # allow specialization for files +    # allow specialization for files, treatment, treatment request      url(r'show-administrativeact(?:/(?P<pk>.+))?/(?P<type>.+)?$',          'show_administrativeact', name='show-administrativeactfile'), +    url(r'show-administrativeact(?:/(?P<pk>.+))?/(?P<type>.+)?$', +        'show_administrativeact', name='show-administrativeacttreatment'), +    url(r'show-administrativeact(?:/(?P<pk>.+))?/(?P<type>.+)?$', +        'show_administrativeact', name='show-administrativeacttreatmentfile'),      url(r'generatedoc-administrativeactop/(?P<pk>.+)?/(?P<template_pk>.+)?$',          'generatedoc_administrativeactop',          name='generatedoc-administrativeactop'), diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py index 18d57e617..005fae0db 100644 --- a/archaeological_operations/views.py +++ b/archaeological_operations/views.py @@ -163,8 +163,8 @@ def dashboard_operation(request, *args, **kwargs):      return render_to_response('ishtar/dashboards/dashboard_operation.html',                                dct, context_instance=RequestContext(request)) -operation_search_wizard = SearchWizard.as_view([ -    ('general-operation_search', OperationFormSelection)], +operation_search_wizard = SearchWizard.as_view( +    [('general-operation_search', OperationFormSelection)],      label=_(u"Operation search"),      url_name='operation_search',) @@ -276,9 +276,14 @@ operation_closing_wizard = OperationClosingWizard.as_view(      label=_(u"Operation closing"),      url_name='operation_closing',) -operation_deletion_wizard = OperationDeletionWizard.as_view([ + +operation_deletion_steps = [      ('selec-operation_deletion', OperationFormSelection), -    ('final-operation_deletion', OperationDeletionForm)], +    ('final-operation_deletion', OperationDeletionForm) +] + +operation_deletion_wizard = OperationDeletionWizard.as_view( +    operation_deletion_steps,      label=_(u"Operation deletion"),      url_name='operation_deletion',) @@ -404,17 +409,30 @@ def generatedoc_administrativeactop(request, pk, template_pk=None):      return HttpResponse(mimetype='text/plain') -def administrativeactfile_document(request, operation=True): +def administrativeactfile_document( +        request, file=False, treatment=False, treatment_file=False):      search_form = AdministrativeActOpeFormSelection -    if not operation: +    document_type = 'O' +    if file:          from archaeological_files.forms import \              AdministrativeActFileFormSelection          search_form = AdministrativeActFileFormSelection +        document_type = 'F' +    elif treatment: +        from archaeological_finds.forms import \ +            AdministrativeActTreatmentFormSelection +        search_form = AdministrativeActTreatmentFormSelection +        document_type = 'T' +    elif treatment_file: +        from archaeological_finds.forms import \ +            AdministrativeActTreatmentFileFormSelection +        search_form = AdministrativeActTreatmentFileFormSelection +        document_type = 'TF'      dct = {}      if request.POST:          dct['search_form'] = search_form(request.POST)          dct['template_form'] = DocumentGenerationAdminActForm( -            operation=operation) +            document_type=document_type)          c_object = None          try:              if dct['search_form'].is_valid(): @@ -425,7 +443,7 @@ def administrativeactfile_document(request, operation=True):              pass          if c_object:              dct['template_form'] = DocumentGenerationAdminActForm( -                request.POST, operation=operation, obj=c_object) +                request.POST, document_type=document_type, obj=c_object)              if dct['template_form'].is_valid():                  return generatedoc_administrativeactop(                      request, @@ -434,7 +452,7 @@ def administrativeactfile_document(request, operation=True):      else:          dct['search_form'] = search_form()          dct['template_form'] = DocumentGenerationAdminActForm( -            operation=operation) +            document_type=document_type)      return render_to_response('ishtar/administrativeact_document.html', dct,                                context_instance=RequestContext(request)) diff --git a/archaeological_operations/wizards.py b/archaeological_operations/wizards.py index 572a25ca0..94aafb87c 100644 --- a/archaeological_operations/wizards.py +++ b/archaeological_operations/wizards.py @@ -17,6 +17,8 @@  # See the file COPYING for details. +import logging +  from django.conf import settings  from django.core.exceptions import ObjectDoesNotExist  from django.core.urlresolvers import reverse @@ -33,6 +35,8 @@ from forms import GenerateDocForm  from archaeological_files.models import File +logger = logging.getLogger(__name__) +  class OperationWizard(Wizard):      model = models.Operation @@ -73,7 +77,7 @@ class OperationWizard(Wizard):      def get_reminder(self):          archaeological_file = self.get_current_file()          if archaeological_file: -            return ((_("Archaelogical file"), +            return ((_("Archaeological file"),                       unicode(archaeological_file)),)      def get_context_data(self, form, **kwargs): @@ -86,7 +90,7 @@ class OperationWizard(Wizard):          if step.startswith('towns'):              context['TOWNS'] = self.get_towns()          elif step.startswith('parcels-') and self.get_current_file(): -            # if a file is acciated to the operation add the button "Add all" +            # if a file is associated to the operation add the button "Add all"              context['add_all'] = True          if step.startswith('parcels') and \             hasattr(self, 'automatic_parcel_association'): @@ -189,14 +193,14 @@ class OperationWizard(Wizard):      def get_formated_datas(self, forms):          """ -        Show a specific warning if no archaelogical file is provided +        Show a specific warning if no archaeological file is provided          """          datas = super(OperationWizard, self).get_formated_datas(forms)          # if the general town form is used the advertissement is relevant          has_no_af = [form.prefix for form in forms                       if form.prefix == 'townsgeneral-operation'] and True          if has_no_af: -            datas = [[_(u"Warning: No Archaelogical File is provided. " +            datas = [[_(u"Warning: No Archaeological File is provided. "                        u"If you have forget it return to the first step."), []]]\                  + datas          return datas @@ -245,7 +249,7 @@ class OperationWizard(Wizard):          request = self.request          post_data = request.POST.copy() -        # add all parcel from available in the archaelogical file +        # add all parcel from available in the archaeological file          if not post_data.get('add_all_parcels'):              return super(OperationWizard, self).post(*args, **kwargs) @@ -327,6 +331,7 @@ class OperationAdministrativeActWizard(OperationWizard):      edit = False      wizard_done_window = reverse_lazy('show-administrativeact')      current_obj_slug = 'administrativeactop' +    ref_object_key = 'operation'      def get_reminder(self):          form_key = 'selec-' + self.url_name @@ -389,11 +394,9 @@ class OperationAdministrativeActWizard(OperationWizard):          else:              associated_item = self.get_associated_item(dct)              if not associated_item: +                logger.warning("Admin act save: no associated model")                  return self.render(form_list[-1]) -            if isinstance(associated_item, File): -                dct['associated_file'] = associated_item -            elif isinstance(associated_item, models.Operation): -                dct['operation'] = associated_item +            dct[self.ref_object_key] = associated_item              admact = models.AdministrativeAct(**dct)          admact.save()          dct['item'] = admact  | 
