summaryrefslogtreecommitdiff
path: root/archaeological_operations
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-04-07 12:16:37 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-04-07 12:16:37 +0200
commit6b87dae76d931ead9838db1f66a6ff1fe1cc1dd1 (patch)
tree0a2273d9db0499214e18a041987339eac9d20ac9 /archaeological_operations
parent75730c0ac55c935c03e58977405b4b8a2233595d (diff)
parent3d8b8d86f01ecb9b37e24e25fd15500b8f4fb2a0 (diff)
downloadIshtar-6b87dae76d931ead9838db1f66a6ff1fe1cc1dd1.tar.bz2
Ishtar-6b87dae76d931ead9838db1f66a6ff1fe1cc1dd1.zip
Merge branch 'master' into v0.9
Diffstat (limited to 'archaeological_operations')
-rw-r--r--archaeological_operations/forms.py68
-rw-r--r--archaeological_operations/locale/django.pot518
-rw-r--r--archaeological_operations/migrations/0067_auto.py851
-rw-r--r--archaeological_operations/models.py25
-rw-r--r--archaeological_operations/templates/ishtar/sheet_administrativeact.html6
-rw-r--r--archaeological_operations/templates/ishtar/sheet_operation.html18
-rw-r--r--archaeological_operations/tests.py23
-rw-r--r--archaeological_operations/urls.py3
-rw-r--r--archaeological_operations/utils.py4
-rw-r--r--archaeological_operations/views.py69
-rw-r--r--archaeological_operations/wizards.py11
11 files changed, 1266 insertions, 330 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py
index 27ab4670a..86bea4ed5 100644
--- a/archaeological_operations/forms.py
+++ b/archaeological_operations/forms.py
@@ -72,7 +72,7 @@ class ParcelForm(forms.Form):
town = forms.ChoiceField(label=_("Town"), choices=(), required=False,
validators=[valid_id(models.Town)])
year = forms.IntegerField(label=_("Year"), required=False,
- validators=[validators.MinValueValidator(1900),
+ validators=[validators.MinValueValidator(1600),
validators.MaxValueValidator(2100)])
section = forms.CharField(label=_(u"Section"), required=False,
validators=[validators.MaxLengthValidator(4)])
@@ -387,6 +387,9 @@ class RecordRelationsForm(ManageOldType, forms.Form):
validators=[valid_id(models.Operation)], required=False)
def __init__(self, *args, **kwargs):
+ self.left_record = None
+ if 'left_record' in kwargs:
+ self.left_record = kwargs.pop('left_record')
super(RecordRelationsForm, self).__init__(*args, **kwargs)
self.fields['relation_type'].choices = \
models.RelationType.get_types(
@@ -413,6 +416,9 @@ class RecordRelationsForm(ManageOldType, forms.Form):
cleaned_data.get('right_record', None)):
raise forms.ValidationError(
_(u"You should select a relation type."))
+ if str(cleaned_data.get('right_record')) == str(self.left_record.pk):
+ raise forms.ValidationError(
+ _(u"An operation cannot be related to herself."))
return cleaned_data
@classmethod
@@ -447,7 +453,27 @@ class RecordRelationsForm(ManageOldType, forms.Form):
result.append((_("Deleted relations"), u" ; ".join(deleted)))
return result
-RecordRelationsFormSet = formset_factory(RecordRelationsForm, can_delete=True)
+
+class RecordRelationsFormSetBase(FormSet):
+ # passing left_record should be nicely done with form_kwargs with Django 1.9
+ # with no need of all these complications
+
+ def __init__(self, *args, **kwargs):
+ self.left_record = None
+ if 'left_record' in kwargs:
+ self.left_record = kwargs.pop('left_record')
+ super(RecordRelationsFormSetBase, self).__init__(*args, **kwargs)
+
+ def _construct_forms(self):
+ # instantiate all the forms and put them in self.forms
+ self.forms = []
+ for i in xrange(self.total_form_count()):
+ self.forms.append(self._construct_form(
+ i, left_record=self.left_record))
+
+
+RecordRelationsFormSet = formset_factory(
+ RecordRelationsForm, can_delete=True, formset=RecordRelationsFormSetBase)
RecordRelationsFormSet.form_label = _(u"Relations")
@@ -733,10 +759,11 @@ class DashboardForm(forms.Form):
class OperationFormGeneral(ManageOldType, forms.Form):
form_label = _(u"General")
- base_model = 'archaeological_site'
+ base_models = ['collaborator']
file_upload = True
associated_models = {'scientist': Person,
'in_charge': Person,
+ 'collaborator': Person,
'cira_rapporteur': Person,
'operator': Organization,
'operation_type': models.OperationType,
@@ -755,7 +782,7 @@ class OperationFormGeneral(ManageOldType, forms.Form):
choices=[])
year = forms.IntegerField(label=_(u"Year"),
initial=lambda: datetime.datetime.now().year,
- validators=[validators.MinValueValidator(1900),
+ validators=[validators.MinValueValidator(1600),
validators.MaxValueValidator(2100)])
old_code = forms.CharField(
label=_(u"Old code"), required=False,
@@ -792,14 +819,13 @@ class OperationFormGeneral(ManageOldType, forms.Form):
limit={'person_types': [person_type_pk_lazy('sra_agent')]},
new=True),
validators=[valid_id(Person)], required=False)
+ collaborator = widgets.Select2MultipleField(
+ model=Person, label=_("Collaborators"), required=False, remote=True)
surface = forms.IntegerField(
required=False, widget=widgets.AreaWidget,
label=_(u"Total surface (m2)"),
validators=[validators.MinValueValidator(0),
validators.MaxValueValidator(999999999)])
- # archaeological_site = widgets.MultipleAutocompleteField(
- # model=models.ArchaeologicalSite,
- # label=_("Associated archaeological sites"), new=True, required=False)
start_date = forms.DateField(
label=_(u"Start date"), required=False, widget=widgets.JQueryDate)
excavation_end_date = forms.DateField(
@@ -857,21 +883,29 @@ class OperationFormGeneral(ManageOldType, forms.Form):
def __init__(self, *args, **kwargs):
super(OperationFormGeneral, self).__init__(*args, **kwargs)
- if not get_current_profile().warehouse:
- self.fields.pop('documentation_deadline')
- self.fields.pop('documentation_received')
- self.fields.pop('finds_deadline')
- self.fields.pop('finds_received')
+ profile = get_current_profile()
+ if not profile.files:
+ self.fields.pop('report_delivery_date')
+ self.fields.pop('report_processing')
+ self.fields.pop('cira_rapporteur')
+ self.fields.pop('cira_date')
+ self.fields.pop('negative_result')
+ if not profile.warehouse:
+ self.fields.pop('documentation_deadline')
+ self.fields.pop('documentation_received')
+ self.fields.pop('finds_deadline')
+ self.fields.pop('finds_received')
self.fields['operation_type'].choices = \
models.OperationType.get_types(
initial=self.init_data.get('operation_type'))
self.fields['operation_type'].help_text = \
models.OperationType.get_help()
- self.fields['report_processing'].choices = \
- models.ReportState.get_types(
- initial=self.init_data.get('report_processing'))
- self.fields['report_processing'].help_text = \
- models.ReportState.get_help()
+ if 'report_processing' in self.fields:
+ self.fields['report_processing'].choices = \
+ models.ReportState.get_types(
+ initial=self.init_data.get('report_processing'))
+ self.fields['report_processing'].help_text = \
+ models.ReportState.get_help()
self.fields['record_quality'].choices = \
[('', '--')] + list(models.QUALITY)
if 'operation_code' in self.fields:
diff --git a/archaeological_operations/locale/django.pot b/archaeological_operations/locale/django.pot
index 3323d638d..f875f6b9a 100644
--- a/archaeological_operations/locale/django.pot
+++ b/archaeological_operations/locale/django.pot
@@ -10,13 +10,13 @@
msgid ""
msgstr ""
-#: forms.py:69 forms.py:371 forms.py:1013 forms.py:1035 forms.py:1039
-#: models.py:1247 templates/ishtar/sheet_operation.html:151
+#: forms.py:69 forms.py:371 forms.py:1047 forms.py:1069 forms.py:1073
+#: models.py:1252 templates/ishtar/sheet_operation.html:153
#: templates/ishtar/blocks/window_tables/parcels.html:10
msgid "Parcels"
msgstr ""
-#: forms.py:72 forms.py:205 forms.py:989 models.py:1233
+#: forms.py:72 forms.py:205 forms.py:1023 models.py:1238
#: templates/ishtar/blocks/window_tables/parcels.html:7
#: templates/ishtar/dashboards/dashboard_operation.html:432
#: templates/ishtar/dashboards/dashboard_operation.html:446
@@ -25,22 +25,22 @@ msgstr ""
msgid "Town"
msgstr ""
-#: forms.py:74 forms.py:455 forms.py:756 forms.py:1259 models.py:272
-#: models.py:1039 models.py:1231
+#: forms.py:74 forms.py:481 forms.py:783 forms.py:1293 models.py:276
+#: models.py:1044 models.py:1236
#: templates/ishtar/blocks/window_tables/parcels.html:8
msgid "Year"
msgstr ""
-#: forms.py:77 models.py:1234
+#: forms.py:77 models.py:1239
#: templates/ishtar/blocks/window_tables/parcels.html:9
msgid "Section"
msgstr ""
-#: forms.py:80 models.py:1236
+#: forms.py:80 models.py:1241
msgid "Parcel number"
msgstr ""
-#: forms.py:82 models.py:1238 models.py:1255 models.py:1304
+#: forms.py:82 models.py:1243 models.py:1260 models.py:1309
msgid "Public domain"
msgstr ""
@@ -76,45 +76,49 @@ msgstr ""
msgid "Relation type"
msgstr ""
-#: forms.py:383 ishtar_menu.py:30 models.py:368 models.py:849 models.py:884
-#: models.py:917 models.py:1021 models.py:1230 wizards.py:344 wizards.py:355
+#: forms.py:383 ishtar_menu.py:30 models.py:372 models.py:847 models.py:882
+#: models.py:922 models.py:1026 models.py:1235 wizards.py:353 wizards.py:364
#: templates/ishtar/sheet_operation.html:4
msgid "Operation"
msgstr ""
-#: forms.py:403
+#: forms.py:406
msgid ":"
msgstr ""
-#: forms.py:411 forms.py:607 forms.py:1224
+#: forms.py:414 forms.py:633 forms.py:1258
msgid "You should select an operation."
msgstr ""
-#: forms.py:415
+#: forms.py:418
msgid "You should select a relation type."
msgstr ""
-#: forms.py:445
+#: forms.py:421
+msgid "An operation cannot be related to herself."
+msgstr ""
+
+#: forms.py:451
msgid "Current relations"
msgstr ""
-#: forms.py:447
+#: forms.py:453
msgid "Deleted relations"
msgstr ""
-#: forms.py:451 templates/ishtar/sheet_operation.html:85
+#: forms.py:477 templates/ishtar/sheet_operation.html:86
msgid "Relations"
msgstr ""
-#: forms.py:456 forms.py:1230 models.py:273
+#: forms.py:482 forms.py:1264 models.py:277
msgid "Numeric reference"
msgstr ""
-#: forms.py:462 forms.py:1270
+#: forms.py:488 forms.py:1304
msgid "Parcel (section/number/public domain)"
msgstr ""
-#: forms.py:465 forms.py:1273 models.py:850
+#: forms.py:491 forms.py:1307 models.py:848
#: templates/ishtar/dashboards/dashboard_operation.html:390
#: templates/ishtar/dashboards/dashboard_operation.html:411
#: templates/ishtar/dashboards/dashboard_operation.html:643
@@ -123,454 +127,458 @@ msgstr ""
msgid "Department"
msgstr ""
-#: forms.py:466 forms.py:1101 models.py:86
+#: forms.py:492 forms.py:1135 models.py:86
#: templates/ishtar/sheet_operation.html:22
#: templates/ishtar/blocks/window_tables/archaeologicalsites.html:8
msgid "Name"
msgstr ""
-#: forms.py:468 forms.py:752 models.py:334
+#: forms.py:494 forms.py:779 models.py:338
msgid "Address / Locality"
msgstr ""
-#: forms.py:470 forms.py:674 forms.py:754 forms.py:1236 models.py:280
+#: forms.py:496 forms.py:700 forms.py:781 forms.py:1270 models.py:284
msgid "Operation type"
msgstr ""
-#: forms.py:472
+#: forms.py:498
msgid "Is open?"
msgstr ""
-#: forms.py:480 forms.py:786 models.py:269
+#: forms.py:506 forms.py:813 models.py:269
msgid "In charge"
msgstr ""
-#: forms.py:487 models.py:1015
+#: forms.py:513 models.py:1020
msgid "Scientist in charge"
msgstr ""
-#: forms.py:489 forms.py:676 forms.py:776 models.py:267
+#: forms.py:515 forms.py:702 forms.py:803 models.py:267
msgid "Operator"
msgstr ""
-#: forms.py:498 forms.py:1106 models.py:90 models.py:282
+#: forms.py:524 forms.py:1140 models.py:90 models.py:286
#: templates/ishtar/blocks/window_tables/archaeologicalsites.html:10
msgid "Remains"
msgstr ""
-#: forms.py:499 forms.py:1084 forms.py:1103 models.py:88 models.py:288
+#: forms.py:525 forms.py:1118 forms.py:1137 models.py:88 models.py:292
#: templates/ishtar/blocks/window_tables/archaeologicalsites.html:9
msgid "Periods"
msgstr ""
-#: forms.py:500
+#: forms.py:526
msgid "Started before"
msgstr ""
-#: forms.py:502
+#: forms.py:528
msgid "Started after"
msgstr ""
-#: forms.py:504
+#: forms.py:530
msgid "Ended before"
msgstr ""
-#: forms.py:506
+#: forms.py:532
msgid "Ended after"
msgstr ""
-#: forms.py:509
+#: forms.py:535
msgid "Search within relations"
msgstr ""
-#: forms.py:511 forms.py:841
+#: forms.py:537 forms.py:867
msgid "Comment"
msgstr ""
-#: forms.py:512
+#: forms.py:538
msgid "Abstract (full text search)"
msgstr ""
-#: forms.py:514 forms.py:844 models.py:337
+#: forms.py:540 forms.py:870 models.py:341
msgid "Comment about scientific documentation"
msgstr ""
-#: forms.py:515 forms.py:846 models.py:349
+#: forms.py:541 forms.py:872 models.py:353
msgid "Record quality"
msgstr ""
-#: forms.py:516 forms.py:811 models.py:300
+#: forms.py:542 forms.py:837 models.py:304
msgid "Report processing"
msgstr ""
-#: forms.py:518 forms.py:849 models.py:344
+#: forms.py:544 forms.py:875 models.py:348
msgid "Virtual operation"
msgstr ""
-#: forms.py:520 forms.py:1146 forms.py:1150 models.py:94
+#: forms.py:546 forms.py:1180 forms.py:1184 models.py:94
msgid "Archaeological site"
msgstr ""
-#: forms.py:526 forms.py:1277
+#: forms.py:552 forms.py:1311
msgid "Created by"
msgstr ""
-#: forms.py:532 forms.py:1283
+#: forms.py:558 forms.py:1317
msgid "Modified by"
msgstr ""
-#: forms.py:539
+#: forms.py:565
msgid "Documentation deadline before"
msgstr ""
-#: forms.py:541
+#: forms.py:567
msgid "Documentation deadline after"
msgstr ""
-#: forms.py:543 forms.py:834 models.py:356
+#: forms.py:569 forms.py:860 models.py:360
msgid "Documentation received"
msgstr ""
-#: forms.py:545
+#: forms.py:571
msgid "Finds deadline before"
msgstr ""
-#: forms.py:547
+#: forms.py:573
msgid "Finds deadline after"
msgstr ""
-#: forms.py:549 forms.py:839 models.py:360
+#: forms.py:575 forms.py:865 models.py:364
msgid "Finds received"
msgstr ""
-#: forms.py:594 forms.py:1222 views.py:168
+#: forms.py:620 forms.py:1256 views.py:168
msgid "Operation search"
msgstr ""
-#: forms.py:638
+#: forms.py:664
msgid "Associated file"
msgstr ""
-#: forms.py:642 forms.py:937 models.py:516 models.py:916 models.py:1026
+#: forms.py:668 forms.py:971 models.py:520 models.py:921 models.py:1031
#: wizards.py:80
msgid "Archaeological file"
msgstr ""
-#: forms.py:649 forms.py:651 models.py:351
+#: forms.py:675 forms.py:677 models.py:355
msgid "Abstract"
msgstr ""
-#: forms.py:654
+#: forms.py:680
msgid "months"
msgstr ""
-#: forms.py:654
+#: forms.py:680
msgid "years"
msgstr ""
-#: forms.py:656 models.py:253
+#: forms.py:682 models.py:253
msgid "Creation date"
msgstr ""
-#: forms.py:657
+#: forms.py:683
msgid "Start of field work"
msgstr ""
-#: forms.py:659
+#: forms.py:685
msgid "All"
msgstr ""
-#: forms.py:660
+#: forms.py:686
msgid "Preventive"
msgstr ""
-#: forms.py:661
+#: forms.py:687
msgid "Research"
msgstr ""
-#: forms.py:665
+#: forms.py:691
msgid "Slicing"
msgstr ""
-#: forms.py:668
+#: forms.py:694
msgid "Department detail"
msgstr ""
-#: forms.py:670
+#: forms.py:696
msgid "Date get from"
msgstr ""
-#: forms.py:672
+#: forms.py:698
msgid "Preventive/Research"
msgstr ""
-#: forms.py:678
+#: forms.py:704
msgid "Date after"
msgstr ""
-#: forms.py:680
+#: forms.py:706
msgid "Date before"
msgstr ""
-#: forms.py:682
+#: forms.py:708
msgid "With reports"
msgstr ""
-#: forms.py:683
+#: forms.py:709
msgid "With finds"
msgstr ""
-#: forms.py:735 forms.py:1331 templates/ishtar/sheet_administrativeact.html:20
+#: forms.py:761 forms.py:1365 templates/ishtar/sheet_administrativeact.html:20
#: templates/ishtar/sheet_operation.html:26
msgid "General"
msgstr ""
-#: forms.py:750 models.py:333
+#: forms.py:777 models.py:337
msgid "Generic name"
msgstr ""
-#: forms.py:761 models.py:302
+#: forms.py:788 models.py:306
msgid "Old code"
msgstr ""
-#: forms.py:764
+#: forms.py:791
msgid "Head scientist"
msgstr ""
-#: forms.py:783 models.py:332
+#: forms.py:810 models.py:336
msgid "Operator reference"
msgstr ""
-#: forms.py:797
+#: forms.py:823 models.py:273
+msgid "Collaborators"
+msgstr ""
+
+#: forms.py:826
msgid "Total surface (m2)"
msgstr ""
-#: forms.py:804 models.py:54 models.py:256 models.py:1443
+#: forms.py:830 models.py:54 models.py:256 models.py:1448
msgid "Start date"
msgstr ""
-#: forms.py:806 models.py:258
+#: forms.py:832 models.py:258
msgid "Excavation end date"
msgstr ""
-#: forms.py:809 models.py:259
+#: forms.py:835 models.py:259
msgid "Report delivery date"
msgstr ""
-#: forms.py:831 models.py:353
+#: forms.py:857 models.py:357
msgid "Deadline for submission of the documentation"
msgstr ""
-#: forms.py:836 models.py:358
+#: forms.py:862 models.py:362
msgid "Deadline for submission of the finds"
msgstr ""
-#: forms.py:851
+#: forms.py:877
msgid "Image"
msgstr ""
-#: forms.py:852
+#: forms.py:878
#, python-format
msgid ""
"<p>Heavy images are resized to: %(width)dx%(height)d (ratio is preserved).</"
"p>"
msgstr ""
-#: forms.py:890
+#: forms.py:924
msgid ""
"If you want to set an excavation end date you have to provide a start date."
msgstr ""
-#: forms.py:895
+#: forms.py:929
msgid "The excavation end date cannot be before the start date."
msgstr ""
-#: forms.py:923
+#: forms.py:957
#, python-format
msgid ""
"Operation code already exists for year: %(year)d - use a value bigger than "
"%(last_val)d"
msgstr ""
-#: forms.py:927
+#: forms.py:961
msgid "Bad operation code"
msgstr ""
-#: forms.py:933 models.py:531 models.py:879
+#: forms.py:967 models.py:535 models.py:877
msgid "Operation code"
msgstr ""
-#: forms.py:959
+#: forms.py:993
msgid "Preventive informations - excavation"
msgstr ""
-#: forms.py:960 models.py:286
+#: forms.py:994 models.py:290
#: templates/ishtar/dashboards/dashboard_operation.html:701
msgid "Cost (euros)"
msgstr ""
-#: forms.py:961 models.py:291
+#: forms.py:995 models.py:295
msgid "Scheduled man-days"
msgstr ""
-#: forms.py:963 models.py:294
+#: forms.py:997 models.py:298
msgid "Optional man-days"
msgstr ""
-#: forms.py:965 models.py:297
+#: forms.py:999 models.py:301
msgid "Effective man-days"
msgstr ""
-#: forms.py:975
+#: forms.py:1009
msgid "Preventive informations - diagnostic"
msgstr ""
-#: forms.py:978 models.py:316
+#: forms.py:1012 models.py:320
msgid "Prescription on zoning"
msgstr ""
-#: forms.py:980 models.py:319
+#: forms.py:1014 models.py:323
msgid "Prescription on large area"
msgstr ""
-#: forms.py:983 models.py:321
+#: forms.py:1017 models.py:325
msgid "Prescription on geoarchaeological context"
msgstr ""
-#: forms.py:987 forms.py:1009 models.py:284 models.py:1049
+#: forms.py:1021 forms.py:1043 models.py:288 models.py:1054
msgid "Towns"
msgstr ""
-#: forms.py:1016 models.py:1246 models.py:1441
+#: forms.py:1050 models.py:1251 models.py:1446
msgid "Parcel"
msgstr ""
-#: forms.py:1068 models.py:46
+#: forms.py:1102 models.py:46
msgid "Remain types"
msgstr ""
-#: forms.py:1072 models.py:45
+#: forms.py:1106 models.py:45
msgid "Remain type"
msgstr ""
-#: forms.py:1088 templates/ishtar/sheet_operation.html:171
-#: templates/ishtar/sheet_operation.html:202
+#: forms.py:1122 templates/ishtar/sheet_operation.html:173
+#: templates/ishtar/sheet_operation.html:204
msgid "Period"
msgstr ""
-#: forms.py:1100 models.py:85
+#: forms.py:1134 models.py:85
msgid "Reference"
msgstr ""
-#: forms.py:1129
+#: forms.py:1163
msgid "This reference already exists."
msgstr ""
-#: forms.py:1161 models.py:95 models.py:341
-#: templates/ishtar/sheet_operation.html:96
+#: forms.py:1195 models.py:95 models.py:345
+#: templates/ishtar/sheet_operation.html:97
msgid "Archaeological sites"
msgstr ""
-#: forms.py:1165
+#: forms.py:1199
msgid "Associated archaeological sites"
msgstr ""
-#: forms.py:1171 ishtar_menu.py:34 ishtar_menu.py:64 ishtar_menu.py:93
+#: forms.py:1205 ishtar_menu.py:34 ishtar_menu.py:64 ishtar_menu.py:93
msgid "Search"
msgstr ""
-#: forms.py:1176
+#: forms.py:1210
msgid "Would you like to close this operation?"
msgstr ""
-#: forms.py:1181
+#: forms.py:1215
msgid "Would you like to delete this operation?"
msgstr ""
-#: forms.py:1190 forms.py:1260 forms.py:1396 models.py:886 models.py:1006
+#: forms.py:1224 forms.py:1294 forms.py:1430 models.py:884 models.py:1011
msgid "Index"
msgstr ""
-#: forms.py:1216
+#: forms.py:1250
#, python-format
msgid ""
"Index already exists for operation: %(operation)s - use a value bigger than "
"%(last_val)d"
msgstr ""
-#: forms.py:1228
+#: forms.py:1262
msgid "Operation's year"
msgstr ""
-#: forms.py:1235
+#: forms.py:1269
msgid "Operation's town"
msgstr ""
-#: forms.py:1248
+#: forms.py:1282
msgid "Documentation search"
msgstr ""
-#: forms.py:1250
+#: forms.py:1284
msgid "You should select a document."
msgstr ""
-#: forms.py:1267 forms.py:1334 models.py:930 models.py:1000
+#: forms.py:1301 forms.py:1368 models.py:935 models.py:1005
msgid "Act type"
msgstr ""
-#: forms.py:1268 forms.py:1466
+#: forms.py:1302 forms.py:1500
msgid "Indexed?"
msgstr ""
-#: forms.py:1274 forms.py:1339 models.py:1040
+#: forms.py:1308 forms.py:1373 models.py:1045
#: templates/ishtar/blocks/window_tables/administrativacts.html:10
msgid "Object"
msgstr ""
-#: forms.py:1311 views.py:333
+#: forms.py:1345 views.py:348
msgid "Administrative act search"
msgstr ""
-#: forms.py:1326 forms.py:1424 forms.py:1491
+#: forms.py:1360 forms.py:1458 forms.py:1525
msgid "You should select an administrative act."
msgstr ""
-#: forms.py:1342 models.py:1037
+#: forms.py:1376 models.py:1042
msgid "Signature date"
msgstr ""
-#: forms.py:1384
+#: forms.py:1418
#, python-format
msgid ""
"This index already exists for year: %(year)d - use a value bigger than "
"%(last_val)d"
msgstr ""
-#: forms.py:1388
+#: forms.py:1422
msgid "Bad index"
msgstr ""
-#: forms.py:1401
+#: forms.py:1435
msgid "Would you like to delete this administrative act?"
msgstr ""
-#: forms.py:1406
+#: forms.py:1440
msgid "Template"
msgstr ""
-#: forms.py:1430 forms.py:1434
+#: forms.py:1464 forms.py:1468
msgid "This document is not intended for this type of act."
msgstr ""
-#: forms.py:1452
+#: forms.py:1486
msgid "Doc generation"
msgstr ""
-#: forms.py:1454
+#: forms.py:1488
msgid "Generate the associated doc?"
msgstr ""
-#: forms.py:1475 ishtar_menu.py:123 views.py:386
+#: forms.py:1509 ishtar_menu.py:123 views.py:401
msgctxt "admin act register"
msgid "Register"
msgstr ""
@@ -591,7 +599,7 @@ msgstr ""
msgid "Deletion"
msgstr ""
-#: ishtar_menu.py:59 models.py:1056
+#: ishtar_menu.py:59 models.py:1061
#: templates/ishtar/sheet_administrativeact.html:4
msgid "Administrative act"
msgstr ""
@@ -616,16 +624,16 @@ msgstr ""
msgid "General informations"
msgstr ""
-#: ishtar_menu.py:139 models.py:369
+#: ishtar_menu.py:139 models.py:373
#: templates/ishtar/dashboards/dashboard_operation.html:8
msgid "Operations"
msgstr ""
-#: models.py:53 models.py:71 models.py:1913
+#: models.py:53 models.py:71 models.py:1918
msgid "Order"
msgstr ""
-#: models.py:55 models.py:1444
+#: models.py:55 models.py:1449
msgid "End date"
msgstr ""
@@ -741,357 +749,357 @@ msgstr ""
msgid "In charge scientist"
msgstr ""
-#: models.py:277 models.py:1226
+#: models.py:281 models.py:1231
msgid "File"
msgstr ""
-#: models.py:281
+#: models.py:285
msgid "Surface (m2)"
msgstr ""
-#: models.py:335
+#: models.py:339
msgid "General comment"
msgstr ""
-#: models.py:338
+#: models.py:342
msgid "Cached name"
msgstr ""
-#: models.py:346
+#: models.py:350
msgid ""
"If checked, it means that this operation have not been officialy registered."
msgstr ""
-#: models.py:362
+#: models.py:366
msgid "Point"
msgstr ""
-#: models.py:363
+#: models.py:367
msgid "Multi polygon"
msgstr ""
-#: models.py:371
+#: models.py:375
msgid "Can view all Operations"
msgstr ""
-#: models.py:372
+#: models.py:376
msgid "Can view own Operation"
msgstr ""
-#: models.py:373
+#: models.py:377
msgid "Can add own Operation"
msgstr ""
-#: models.py:374
+#: models.py:378
msgid "Can change own Operation"
msgstr ""
-#: models.py:375
+#: models.py:379
msgid "Can delete own Operation"
msgstr ""
-#: models.py:376
+#: models.py:380
msgid "Can close Operation"
msgstr ""
-#: models.py:405
+#: models.py:409
msgid "OPE"
msgstr ""
-#: models.py:479
+#: models.py:483
msgid "Intercommunal"
msgstr ""
-#: models.py:517
+#: models.py:521
msgid "Code patriarche"
msgstr ""
-#: models.py:557
+#: models.py:561
msgid "This operation code already exists for this year"
msgstr ""
-#: models.py:582
+#: models.py:588
msgid "Number of parcels"
msgstr ""
-#: models.py:600
+#: models.py:598
msgid "Number of administrative acts"
msgstr ""
-#: models.py:608
+#: models.py:606
msgid "Number of indexed administrative acts"
msgstr ""
-#: models.py:616
+#: models.py:614
msgid "Number of context records"
msgstr ""
-#: models.py:652
+#: models.py:650
msgid "Number of finds"
msgstr ""
-#: models.py:697
+#: models.py:695
msgid "No type"
msgstr ""
-#: models.py:728
+#: models.py:726
msgid "Number of sources"
msgstr ""
-#: models.py:770 templates/ishtar/dashboards/dashboard_operation.html:309
+#: models.py:768 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:820
+#: models.py:818
msgid "Inverse relation"
msgstr ""
-#: models.py:824
+#: models.py:822
msgid "Operation relation type"
msgstr ""
-#: models.py:825
+#: models.py:823
msgid "Operation relation types"
msgstr ""
-#: models.py:838
+#: models.py:836
msgid "Operation record relation"
msgstr ""
-#: models.py:839
+#: models.py:837
msgid "Operation record relations"
msgstr ""
-#: models.py:878
+#: models.py:876
msgid "Operation year"
msgstr ""
-#: models.py:880
+#: models.py:878
msgid "Document code"
msgstr ""
-#: models.py:890
+#: models.py:888
msgid "Operation documentation"
msgstr ""
-#: models.py:891
+#: models.py:889
msgid "Operation documentations"
msgstr ""
-#: models.py:894
+#: models.py:892
msgid "Can view all Operation sources"
msgstr ""
-#: models.py:896
+#: models.py:894
msgid "Can view own Operation source"
msgstr ""
-#: models.py:898
+#: models.py:896
msgid "Can add own Operation source"
msgstr ""
-#: models.py:900
+#: models.py:898
msgid "Can change own Operation source"
msgstr ""
-#: models.py:902
+#: models.py:900
msgid "Can delete own Operation source"
msgstr ""
-#: models.py:918 models.py:1031
+#: models.py:923 models.py:1036
msgid "Treatment request"
msgstr ""
-#: models.py:919 models.py:1036
+#: models.py:924 models.py:1041
msgid "Treatment"
msgstr ""
-#: models.py:921
+#: models.py:926
msgid "Intended to"
msgstr ""
-#: models.py:923
+#: models.py:928
msgid "Code"
msgstr ""
-#: models.py:926
+#: models.py:931
msgid "Associated template"
msgstr ""
-#: models.py:927
+#: models.py:932
msgid "Indexed"
msgstr ""
-#: models.py:931
+#: models.py:936
msgid "Act types"
msgstr ""
-#: models.py:997 models.py:1077
+#: models.py:1002 models.py:1082
#: templates/ishtar/blocks/window_tables/administrativacts.html:7
#: templates/ishtar/blocks/window_tables/archaeologicalsites.html:7
msgid "Ref."
msgstr ""
-#: models.py:1004
+#: models.py:1009
msgid "Person in charge of the operation"
msgstr ""
-#: models.py:1010
+#: models.py:1015
msgid "Archaeological preventive operator"
msgstr ""
-#: models.py:1018
+#: models.py:1023
msgid "Signatory"
msgstr ""
-#: models.py:1046
+#: models.py:1051
msgid "Departments"
msgstr ""
-#: models.py:1047
+#: models.py:1052
msgid "Cached values get from associated departments"
msgstr ""
-#: models.py:1050
+#: models.py:1055
msgid "Cached values get from associated towns"
msgstr ""
-#: models.py:1057 templates/ishtar/sheet_operation.html:104
-#: templates/ishtar/sheet_operation.html:145
+#: models.py:1062 templates/ishtar/sheet_operation.html:105
+#: templates/ishtar/sheet_operation.html:147
msgid "Administrative acts"
msgstr ""
-#: models.py:1060
+#: models.py:1065
msgid "Can view all Administrative acts"
msgstr ""
-#: models.py:1062
+#: models.py:1067
msgid "Can view own Administrative act"
msgstr ""
-#: models.py:1064
+#: models.py:1069
msgid "Can add own Administrative act"
msgstr ""
-#: models.py:1066
+#: models.py:1071
msgid "Can change own Administrative act"
msgstr ""
-#: models.py:1068
+#: models.py:1073
msgid "Can delete own Administrative act"
msgstr ""
-#: models.py:1171
+#: models.py:1176
msgid "This index already exists for this year"
msgstr ""
-#: models.py:1239
+#: models.py:1244
msgid "External ID"
msgstr ""
-#: models.py:1242
+#: models.py:1247
msgid "External ID is set automatically"
msgstr ""
-#: models.py:1243
+#: models.py:1248
msgid "Address - Locality"
msgstr ""
-#: models.py:1439
+#: models.py:1444
msgid "Owner"
msgstr ""
-#: models.py:1447
+#: models.py:1452
msgid "Parcel owner"
msgstr ""
-#: models.py:1448
+#: models.py:1453
msgid "Parcel owners"
msgstr ""
-#: models.py:1474
+#: models.py:1479
msgid "Recorded"
msgstr ""
-#: models.py:1475
+#: models.py:1480
msgid "Effective"
msgstr ""
-#: models.py:1476
+#: models.py:1481
msgid "Active"
msgstr ""
-#: models.py:1477
+#: models.py:1482
msgid "Field completed"
msgstr ""
-#: models.py:1478
+#: models.py:1483
msgid "Associated report"
msgstr ""
-#: models.py:1479
+#: models.py:1484
msgid "Closed"
msgstr ""
-#: models.py:1480
+#: models.py:1485
msgid "Documented and closed"
msgstr ""
-#: models.py:1914
+#: models.py:1919
msgid "Is preventive"
msgstr ""
-#: models.py:1917
+#: models.py:1922
msgid "Operation type old"
msgstr ""
-#: models.py:1918
+#: models.py:1923
msgid "Operation types old"
msgstr ""
-#: views.py:214
+#: views.py:223
msgid "New operation"
msgstr ""
-#: views.py:237
+#: views.py:267
msgid "Operation modification"
msgstr ""
-#: views.py:280
+#: views.py:295
msgid "Operation closing"
msgstr ""
-#: views.py:291
+#: views.py:306
msgid "Operation deletion"
msgstr ""
-#: views.py:296
+#: views.py:311
msgid "Operation: source search"
msgstr ""
-#: views.py:304
+#: views.py:319
msgid "Operation: source creation"
msgstr ""
-#: views.py:312
+#: views.py:327
msgid "Operation: source modification"
msgstr ""
-#: views.py:327
+#: views.py:342
msgid "Operation: source deletion"
msgstr ""
-#: views.py:346
+#: views.py:361
msgid "Operation: new administrative act"
msgstr ""
-#: views.py:356
+#: views.py:371
msgid "Operation: administrative act modification"
msgstr ""
-#: views.py:380
+#: views.py:395
msgid "Operation: administrative act deletion"
msgstr ""
@@ -1106,7 +1114,7 @@ msgid ""
msgstr ""
#: templates/ishtar/sheet_administrativeact.html:36
-#: templates/ishtar/sheet_operation.html:40
+#: templates/ishtar/sheet_operation.html:41
msgid "Surface:"
msgstr ""
@@ -1126,92 +1134,96 @@ msgstr ""
msgid "Begining date"
msgstr ""
-#: templates/ishtar/sheet_operation.html:36
+#: templates/ishtar/sheet_operation.html:37
msgid "State:"
msgstr ""
-#: templates/ishtar/sheet_operation.html:36
+#: templates/ishtar/sheet_operation.html:37
msgid "Active file"
msgstr ""
-#: templates/ishtar/sheet_operation.html:37
+#: templates/ishtar/sheet_operation.html:38
msgid "Closed operation"
msgstr ""
-#: templates/ishtar/sheet_operation.html:38
+#: templates/ishtar/sheet_operation.html:39
msgid "Closing date:"
msgstr ""
-#: templates/ishtar/sheet_operation.html:38
+#: templates/ishtar/sheet_operation.html:39
msgid "by"
msgstr ""
-#: templates/ishtar/sheet_operation.html:41
+#: templates/ishtar/sheet_operation.html:42
msgid "Cost:"
msgstr ""
-#: templates/ishtar/sheet_operation.html:42
+#: templates/ishtar/sheet_operation.html:43
msgid "Duration:"
msgstr ""
-#: templates/ishtar/sheet_operation.html:42
+#: templates/ishtar/sheet_operation.html:43
msgid "Day"
msgstr ""
-#: templates/ishtar/sheet_operation.html:75
+#: templates/ishtar/sheet_operation.html:76
msgid "Localisation"
msgstr ""
-#: templates/ishtar/sheet_operation.html:100
+#: templates/ishtar/sheet_operation.html:101
msgid "Associated parcels"
msgstr ""
-#: templates/ishtar/sheet_operation.html:108
+#: templates/ishtar/sheet_operation.html:109
msgid "Document from this operation"
msgstr ""
-#: templates/ishtar/sheet_operation.html:114
-#: templates/ishtar/sheet_operation.html:156
+#: templates/ishtar/sheet_operation.html:115
+#: templates/ishtar/sheet_operation.html:158
msgid "Context records"
msgstr ""
-#: templates/ishtar/sheet_operation.html:119
+#: templates/ishtar/sheet_operation.html:120
msgid "Context record relations"
msgstr ""
-#: templates/ishtar/sheet_operation.html:124
+#: templates/ishtar/sheet_operation.html:125
msgid "Documents from associated context records"
msgstr ""
-#: templates/ishtar/sheet_operation.html:129
-#: templates/ishtar/sheet_operation.html:179
+#: templates/ishtar/sheet_operation.html:130
+#: templates/ishtar/sheet_operation.html:181
msgid "Finds"
msgstr ""
-#: templates/ishtar/sheet_operation.html:134
+#: templates/ishtar/sheet_operation.html:135
msgid "Documents from associated finds"
msgstr ""
-#: templates/ishtar/sheet_operation.html:139
+#: templates/ishtar/sheet_operation.html:140
msgid "Associated containers"
msgstr ""
-#: templates/ishtar/sheet_operation.html:143
+#: templates/ishtar/sheet_operation.html:144
msgid "Statistics"
msgstr ""
-#: templates/ishtar/sheet_operation.html:163
-#: templates/ishtar/sheet_operation.html:217
+#: templates/ishtar/sheet_operation.html:145
+msgid "Theses number are updated hourly"
+msgstr ""
+
+#: templates/ishtar/sheet_operation.html:165
+#: templates/ishtar/sheet_operation.html:219
#: templates/ishtar/blocks/window_tables/administrativacts.html:8
msgid "Type"
msgstr ""
-#: templates/ishtar/sheet_operation.html:163
-#: templates/ishtar/sheet_operation.html:171
-#: templates/ishtar/sheet_operation.html:186
-#: templates/ishtar/sheet_operation.html:194
-#: templates/ishtar/sheet_operation.html:202
-#: templates/ishtar/sheet_operation.html:217
+#: templates/ishtar/sheet_operation.html:165
+#: templates/ishtar/sheet_operation.html:173
+#: templates/ishtar/sheet_operation.html:188
+#: templates/ishtar/sheet_operation.html:196
+#: templates/ishtar/sheet_operation.html:204
+#: templates/ishtar/sheet_operation.html:219
#: templates/ishtar/dashboards/dashboard_operation.html:18
#: templates/ishtar/dashboards/dashboard_operation.html:164
#: templates/ishtar/dashboards/dashboard_operation.html:432
@@ -1220,19 +1232,19 @@ msgstr ""
msgid "Number"
msgstr ""
-#: templates/ishtar/sheet_operation.html:186
+#: templates/ishtar/sheet_operation.html:188
msgid "Material type"
msgstr ""
-#: templates/ishtar/sheet_operation.html:194
+#: templates/ishtar/sheet_operation.html:196
msgid "Object type"
msgstr ""
-#: templates/ishtar/sheet_operation.html:210
+#: templates/ishtar/sheet_operation.html:212
msgid "Sources"
msgstr ""
-#: templates/ishtar/sheet_operation.html:226
+#: templates/ishtar/sheet_operation.html:228
msgid "Finds by context records"
msgstr ""
diff --git a/archaeological_operations/migrations/0067_auto.py b/archaeological_operations/migrations/0067_auto.py
new file mode 100644
index 000000000..f09437198
--- /dev/null
+++ b/archaeological_operations/migrations/0067_auto.py
@@ -0,0 +1,851 @@
+# -*- coding: utf-8 -*-
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding M2M table for field collaborators on 'Operation'
+ db.create_table('archaeological_operations_operation_collaborators', (
+ ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
+ ('operation', models.ForeignKey(orm['archaeological_operations.operation'], null=False)),
+ ('person', models.ForeignKey(orm['ishtar_common.person'], null=False))
+ ))
+ db.create_unique('archaeological_operations_operation_collaborators', ['operation_id', 'person_id'])
+
+
+ def backwards(self, orm):
+ # Removing M2M table for field collaborators on 'Operation'
+ db.delete_table('archaeological_operations_operation_collaborators')
+
+
+ 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': '2017'})
+ },
+ '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'},
+ 'cached_label': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ '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'}),
+ 'estimated_cost': ('django.db.models.fields.FloatField', [], {'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'}),
+ 'insurance_cost': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
+ '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']"}),
+ 'quoted_cost': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
+ 'realized_cost': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
+ '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_state': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.TreatmentState']", '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': '2017'})
+ },
+ 'archaeological_finds.treatmentfile': {
+ 'Meta': {'ordering': "('cached_label',)", 'unique_together': "(('year', 'index'),)", 'object_name': 'TreatmentFile'},
+ 'applicant': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatmentfile_applicant'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Person']"}),
+ 'applicant_organisation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'treatmentfile_applicant'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}),
+ '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': '2017'})
+ },
+ '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.treatmentstate': {
+ 'Meta': {'ordering': "('label',)", 'object_name': 'TreatmentState'},
+ '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'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
+ 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_finds.TreatmentType']", 'null': 'True', 'blank': 'True'}),
+ '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'}),
+ 'address': ('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'}),
+ 'address': ('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'}),
+ 'collaborators': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['ishtar_common.Person']", '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': {'ordering': "('cached_label',)", 'unique_together': "(('index', 'location'),)", 'object_name': 'Container'},
+ 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'cached_label': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}),
+ 'cached_location': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'container_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.ContainerType']"}),
+ 'external_id': ('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_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'}),
+ '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_warehouse_container'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}),
+ 'index': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'location': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'containers'", 'to': "orm['archaeological_warehouse.Warehouse']"}),
+ 'reference': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
+ 'responsible': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'owned_containers'", 'to': "orm['archaeological_warehouse.Warehouse']"}),
+ 'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'})
+ },
+ '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.FloatField', [], {'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'}),
+ 'associated_divisions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_warehouse.WarehouseDivision']", 'symmetrical': 'False', 'through': "orm['archaeological_warehouse.WarehouseDivisionLink']", 'blank': 'True'}),
+ 'auto_external_id': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ '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'}),
+ 'external_id': ('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_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': '200'}),
+ '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.warehousedivision': {
+ 'Meta': {'object_name': 'WarehouseDivision'},
+ '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_warehouse.warehousedivisionlink': {
+ 'Meta': {'ordering': "('warehouse', 'order')", 'unique_together': "(('warehouse', 'division'),)", 'object_name': 'WarehouseDivisionLink'},
+ 'division': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.WarehouseDivision']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
+ 'warehouse': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_warehouse.Warehouse']"})
+ },
+ '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': {'ordering': "('author_type__order', 'person__name')", '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': {'ordering': "['order', 'label']", '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'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
+ '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': {'ordering': "['label']", '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': '255', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'imported_file': ('django.db.models.fields.files.FileField', [], {'max_length': '220'}),
+ 'imported_images': ('django.db.models.fields.files.FileField', [], {'max_length': '220', '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': '255', 'null': 'True', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}),
+ 'result_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', '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.importermodel': {
+ 'Meta': {'ordering': "('name',)", 'object_name': 'ImporterModel'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'klass': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'})
+ },
+ 'ishtar_common.importertype': {
+ 'Meta': {'ordering': "('name',)", 'object_name': 'ImporterType'},
+ 'associated_models': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.ImporterModel']"}),
+ 'created_models': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.ImporterModel']"}),
+ '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': {'ordering': "['label']", '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'] \ No newline at end of file
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index e741f5644..3826678c3 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -269,6 +269,10 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms,
verbose_name=_(u"In charge"),
on_delete=models.SET_NULL,
related_name='operation_responsability')
+ collaborators = models.ManyToManyField(
+ Person, blank=True, null=True, verbose_name=_(u"Collaborators"),
+ related_name='operation_collaborator'
+ )
year = models.IntegerField(_(u"Year"), null=True, blank=True)
operation_code = models.IntegerField(_(u"Numeric reference"), null=True,
blank=True)
@@ -570,8 +574,10 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms,
@classmethod
def get_query_owns(cls, user):
- return (Q(in_charge=user.ishtaruser.person) |\
- Q(scientist=user.ishtaruser.person) |\
+ return (
+ Q(in_charge=user.ishtaruser.person) |
+ Q(scientist=user.ishtaruser.person) |
+ Q(collaborators__pk=user.ishtaruser.person.pk) |
Q(history_creator=user)) & Q(end_date__isnull=True)
def is_active(self):
@@ -587,14 +593,6 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms,
nb = self.parcels.count()
return nb
- def _get_or_set_stats(self, funcname, update):
- key, val = get_cache(self.__class__, [funcname, self.pk])
- if not update and val is not None:
- return val
- val = getattr(self, funcname)()
- cache.set(key, val, settings.CACHE_TIMEOUT)
- return val
-
@property
def nb_acts(self, update=False):
_(u"Number of administrative acts")
@@ -911,6 +909,13 @@ class OperationSource(Source):
return u"{}-{:04d}".format(self.operation.code_patriarche or '',
self.index)
+ @classmethod
+ def get_query_owns(cls, user):
+ return (Q(operation__in_charge=user.ishtaruser.person) |
+ Q(operation__scientist=user.ishtaruser.person) |
+ Q(operation__collaborators__pk=user.ishtaruser.person.pk)) \
+ & Q(operation__end_date__isnull=True)
+
class ActType(GeneralType):
TYPE = (('F', _(u'Archaeological file')),
diff --git a/archaeological_operations/templates/ishtar/sheet_administrativeact.html b/archaeological_operations/templates/ishtar/sheet_administrativeact.html
index 080275aa9..92246ba80 100644
--- a/archaeological_operations/templates/ishtar/sheet_administrativeact.html
+++ b/archaeological_operations/templates/ishtar/sheet_administrativeact.html
@@ -33,13 +33,13 @@
{% field_li_detail "Treatment request" item.treatment_file %}
{% 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>
+ <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_detail "Created by" item.history_creator.ishtaruser.person %}
{% comment %}{% if item.general_contractor.attached_to %}<p>
- <label>{% trans "General contractor organisation:"%}</label>
+ <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 %}
+{% if item.general_contractor %}<p><label>{%trans "General contractor"%}</label> <span class='value'>{{ item.general_contractor.full_label }}</span></p>{% endif %}
{% endcomment %}
</ul>
diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html
index 48116433c..5a02236a3 100644
--- a/archaeological_operations/templates/ishtar/sheet_operation.html
+++ b/archaeological_operations/templates/ishtar/sheet_operation.html
@@ -29,17 +29,18 @@
{% include "ishtar/blocks/sheet_creation_section.html" %}
{% trans "Begining date" as begining_date_label %}
{% field_li begining_date_label item.start_date %}
-{% field_li "Excavation end date" item.excavation_end_date|default:"-" %}
-{% field_li_detail "Head scientist" item.scientist %}
-{% field_li_detail "In charge" item.in_charge %}
-{% field_li_detail "Operator" item.operator %}
+ {% field_li "Excavation end date" item.excavation_end_date|default:"-" %}
+ {% field_li_detail "Head scientist" item.scientist %}
+ {% field_li_detail "In charge" item.in_charge %}
+ {% field_li_multiple "Collaborators" item.collaborators %}
+ {% field_li_detail "Operator" item.operator %}
<li><label>{%trans "State:"%}</label> <span class='value'>{% if item.is_active %}{%trans "Active file"%}</span></p>
{% else %}{%trans "Closed operation"%}</span></li> {% endif %}
-{% if item.closing.date %}<li><label>{%trans "Closing date:"%}</label> <span class='value'>{{ item.closing.date }} <strong>{%trans "by" %}</strong> {{ item.closing.user }}</span></li>{% endif %}
+{% if item.closing.date %}<li><label>{%trans "Closing date"%}</label> <span class='value'>{{ item.closing.date }} <strong>{%trans "by" %}</strong> {{ item.closing.user }}</span></li>{% endif %}
{% field_li "Type" item.operation_type %}
-{% if item.surface %}<li><label>{%trans "Surface:"%}</label> <span class='value'>{{ item.surface }} m<sup>2</sup> ({{ item.surface_ha }} ha)</span></li>{% endif %}
-{% if item.cost %}<li><label>{%trans "Cost:"%}</label> <span class='value'>{{ item.cost }} &euro;{% if item.cost_by_m2 %}, ({{ item.cost_by_m2 }} &euro;/m<sup>2</sup>){%endif%}</span></li>{%endif%}
-{% if item.duration %}<li><label>{%trans "Duration:"%}</label> <span class='value'>{{ item.duration }} {%trans "Day"%}s</span></li>{%endif%}
+{% if item.surface %}<li><label>{%trans "Surface"%}</label> <span class='value'>{{ item.surface }} m<sup>2</sup> ({{ item.surface_ha }} ha)</span></li>{% endif %}
+{% if item.cost %}<li><label>{%trans "Cost"%}</label> <span class='value'>{{ item.cost }} &euro;{% if item.cost_by_m2 %}, ({{ item.cost_by_m2 }} &euro;/m<sup>2</sup>){%endif%}</span></li>{%endif%}
+{% if item.duration %}<li><label>{%trans "Duration"%}</label> <span class='value'>{{ item.duration }} {%trans "Day"%}s</span></li>{%endif%}
{% field_li_multiple "Remains" item.remains %}
{% field_li_multiple "Periods" item.periods %}
{% if item.QUALITY_DICT %}{% field_li "Record quality" item.record_quality|from_dict:item.QUALITY_DICT %}{% endif %}
@@ -141,6 +142,7 @@
{% endif %}
<h3>{% trans "Statistics" %}</h3>
+<small class="centered"><em>{% trans "These numbers are updated hourly" %}</em></small>
<h4>{% trans "Administrative acts" %}</h4>
<ul class='form-flex'>
diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py
index 9d5b9c616..67f9454fa 100644
--- a/archaeological_operations/tests.py
+++ b/archaeological_operations/tests.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-# Copyright (C) 2012-2016 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
+# Copyright (C) 2012-2017 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -699,7 +699,8 @@ class OperationTest(TestCase, OperationInitTest):
'../archaeological_operations/fixtures/initial_data-fr.json']
def setUp(self):
- IshtarSiteProfile.objects.create()
+ IshtarSiteProfile.objects.get_or_create(
+ slug='default', active=True)
self.username, self.password, self.user = create_superuser()
self.alt_username, self.alt_password, self.alt_user = create_user()
self.alt_user.user_permissions.add(Permission.objects.get(
@@ -886,7 +887,8 @@ class OperationSearchTest(TestCase, OperationInitTest):
'../archaeological_operations/fixtures/initial_data-fr.json']
def setUp(self):
- IshtarSiteProfile.objects.create()
+ IshtarSiteProfile.objects.get_or_create(
+ slug='default', active=True)
self.username, self.password, self.user = create_superuser()
self.alt_username, self.alt_password, self.alt_user = create_user()
self.alt_user.user_permissions.add(Permission.objects.get(
@@ -1012,7 +1014,7 @@ class RegisterTest(TestCase, OperationInitTest):
def testSearch(self):
c = Client()
response = c.get(reverse('get-administrativeact'), {'year': '2014'})
- # no result when no authentification
+ # no result when no authentication
self.assertTrue(not json.loads(response.content))
c.login(username=self.username, password=self.password)
response = c.get(reverse('get-administrativeact'), {'year': '2014'})
@@ -1037,34 +1039,39 @@ class OperationWizardCreationTest(WizardTest, OperationInitTest, TestCase):
FormData(
"Create a preventive diag",
form_datas={
+ 'filechoice-operation_creation': {},
'general-operation_creation': {
'operation_type': 1, # preventive diag
'year': 2016},
'townsgeneral-operation_creation': [],
'parcelsgeneral-operation_creation': [],
},
- ignored=('filechoice-operation_creation',
- 'towns-operation_creation',
+ ignored=('towns-operation_creation',
'parcels-operation_creation',
'preventive-operation_creation',)
),
FormData(
"Create another preventive diag with same parcel name",
form_datas={
+ 'filechoice-operation_creation': {},
'general-operation_creation': {
'operation_type': 1, # preventive diag
'year': 2016},
'townsgeneral-operation_creation': [],
'parcelsgeneral-operation_creation': [],
},
- ignored=('filechoice-operation_creation',
- 'towns-operation_creation',
+ ignored=('towns-operation_creation',
'parcels-operation_creation',
'preventive-operation_creation',)
)
]
def pre_wizard(self):
+ profile, created = IshtarSiteProfile.objects.get_or_create(
+ slug='default', active=True)
+ profile.files = True
+ profile.save()
+
if 'townsgeneral-operation_creation' not in \
self.form_datas[0].form_datas:
return super(OperationWizardCreationTest, self).pre_wizard()
diff --git a/archaeological_operations/urls.py b/archaeological_operations/urls.py
index e98ddc93f..bc6bc4bee 100644
--- a/archaeological_operations/urls.py
+++ b/archaeological_operations/urls.py
@@ -69,7 +69,8 @@ urlpatterns = patterns(
check_rights(['view_operation', 'view_own_operation'])(
views.operation_search_wizard), name='operation_search'),
url(r'operation_creation/(?P<step>.+)?$',
- check_rights(['add_operation'])(views.operation_creation_wizard),
+ check_rights(['add_operation', 'add_own_operation'])(
+ views.operation_creation_wizard),
name='operation_creation'),
url(r'operation_add/(?P<file_id>\d+)$',
views.operation_add, name='operation_add'),
diff --git a/archaeological_operations/utils.py b/archaeological_operations/utils.py
index a84ff44ae..40ca71c05 100644
--- a/archaeological_operations/utils.py
+++ b/archaeological_operations/utils.py
@@ -254,9 +254,9 @@ def parse_year(value):
value = parse_string(value)
try:
yr = int(value)
- except:
+ except ValueError:
return None
- if yr < 1900 or yr > 2100:
+ if yr < 1600 or yr > 2100:
return None
return yr
diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py
index c4e4acb5e..9b420f594 100644
--- a/archaeological_operations/views.py
+++ b/archaeological_operations/views.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
+# Copyright (C) 2010-2017 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -185,20 +185,29 @@ wizard_steps = [
('final-operation_creation', FinalForm)]
-def check_files_for_operation(self):
- if not check_rights_condition(['view_file'])(self):
- return False
- return get_current_profile().files
+def get_check_files_for_operation(other_check=None):
+ def func(self):
+ if not get_current_profile().files or \
+ not check_rights_condition(['view_file'])(self):
+ return False
+ if not other_check:
+ return True
+ return other_check(self)
+ return func
+
+check_files_for_operation = get_check_files_for_operation()
+
ope_crea_condition_dict = {
- 'filechoice-operation_creation':
- check_files_for_operation,
+ 'filechoice-operation_creation': check_files_for_operation,
'preventive-operation_creation':
- is_preventive('general-operation_creation', models.OperationType,
- 'operation_type', 'prev_excavation'),
+ get_check_files_for_operation(
+ is_preventive('general-operation_creation', models.OperationType,
+ 'operation_type', 'prev_excavation')),
'preventivediag-operation_creation':
- is_preventive('general-operation_creation', models.OperationType,
- 'operation_type', 'arch_diagnostic'),
+ get_check_files_for_operation(
+ is_preventive('general-operation_creation', models.OperationType,
+ 'operation_type', 'arch_diagnostic')),
'townsgeneral-operation_creation': has_associated_file(
'filechoice-operation_creation', negate=True),
'towns-operation_creation': has_associated_file(
@@ -232,25 +241,31 @@ operation_modif_wizard_steps = [
('final-operation_modification', FinalForm)
]
+
+ope_modif_condition_dict = {
+ 'preventive-operation_modification':
+ get_check_files_for_operation(
+ is_preventive('general-operation_modification', models.OperationType,
+ 'operation_type', 'prev_excavation')),
+ 'preventivediag-operation_modification':
+ get_check_files_for_operation(
+ is_preventive('general-operation_modification', models.OperationType,
+ 'operation_type', 'arch_diagnostic')),
+ 'townsgeneral-operation_modification': has_associated_file(
+ 'general-operation_modification', negate=True),
+ 'towns-operation_modification': has_associated_file(
+ 'general-operation_modification'),
+ 'parcelsgeneral-operation_modification': has_associated_file(
+ 'general-operation_modification', negate=True),
+ 'parcels-operation_modification': has_associated_file(
+ 'general-operation_modification'),
+
+}
+
operation_modification_wizard = OperationModificationWizard.as_view(
operation_modif_wizard_steps,
label=_(u"Operation modification"),
- condition_dict={
- 'preventive-operation_modification': is_preventive(
- 'general-operation_modification', models.OperationType,
- 'operation_type', 'prev_excavation'),
- 'preventivediag-operation_modification': is_preventive(
- 'general-operation_modification', models.OperationType,
- 'operation_type', 'arch_diagnostic'),
- 'townsgeneral-operation_modification': has_associated_file(
- 'general-operation_modification', negate=True),
- 'towns-operation_modification': has_associated_file(
- 'general-operation_modification'),
- 'parcelsgeneral-operation_modification': has_associated_file(
- 'general-operation_modification', negate=True),
- 'parcels-operation_modification': has_associated_file(
- 'general-operation_modification'),
-},
+ condition_dict=ope_modif_condition_dict,
url_name='operation_modification',)
diff --git a/archaeological_operations/wizards.py b/archaeological_operations/wizards.py
index 5410b37f8..c132c24be 100644
--- a/archaeological_operations/wizards.py
+++ b/archaeological_operations/wizards.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-# Copyright (C) 2012-2016 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
+# Copyright (C) 2012-2017 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -275,6 +275,15 @@ class OperationModificationWizard(OperationWizard):
modification = True
filter_owns = {'selec-operation_modification': ['pk']}
+ def get_form_kwargs(self, step, **kwargs):
+ kwargs = super(OperationModificationWizard, self).get_form_kwargs(
+ step, **kwargs)
+ print(step)
+ if step != "relations-operation_modification":
+ return kwargs
+ kwargs["left_record"] = self.get_current_object()
+ return kwargs
+
class OperationClosingWizard(ClosingWizard):
model = models.Operation