summaryrefslogtreecommitdiff
path: root/archaeological_operations
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_operations')
-rw-r--r--archaeological_operations/locale/django.pot366
-rw-r--r--archaeological_operations/models.py7
-rw-r--r--archaeological_operations/templates/ishtar/sheet_operation.html16
-rw-r--r--archaeological_operations/tests.py52
-rw-r--r--archaeological_operations/tests/MCC-parcelles-example.csv1
5 files changed, 236 insertions, 206 deletions
diff --git a/archaeological_operations/locale/django.pot b/archaeological_operations/locale/django.pot
index 6cd5acef2..800f6a31e 100644
--- a/archaeological_operations/locale/django.pot
+++ b/archaeological_operations/locale/django.pot
@@ -10,12 +10,12 @@ msgid ""
msgstr ""
#: forms.py:69 forms.py:371 forms.py:1009 forms.py:1031 forms.py:1035
-#: models.py:1224 templates/ishtar/sheet_operation.html:144
+#: models.py:1221 templates/ishtar/sheet_operation.html:156
#: templates/ishtar/blocks/window_tables/parcels.html:10
msgid "Parcels"
msgstr ""
-#: forms.py:72 forms.py:205 forms.py:985 models.py:1210
+#: forms.py:72 forms.py:205 forms.py:985 models.py:1207
#: templates/ishtar/blocks/window_tables/parcels.html:7
#: templates/ishtar/dashboards/dashboard_operation.html:432
#: templates/ishtar/dashboards/dashboard_operation.html:446
@@ -24,22 +24,22 @@ msgstr ""
msgid "Town"
msgstr ""
-#: forms.py:74 forms.py:455 forms.py:752 forms.py:1255 models.py:275
-#: models.py:1016 models.py:1208
+#: forms.py:74 forms.py:455 forms.py:752 forms.py:1255 models.py:272
+#: models.py:1013 models.py:1205
#: templates/ishtar/blocks/window_tables/parcels.html:8
msgid "Year"
msgstr ""
-#: forms.py:77 models.py:1211
+#: forms.py:77 models.py:1208
#: templates/ishtar/blocks/window_tables/parcels.html:9
msgid "Section"
msgstr ""
-#: forms.py:80 models.py:1213
+#: forms.py:80 models.py:1210
msgid "Parcel number"
msgstr ""
-#: forms.py:82 models.py:1215 models.py:1232 models.py:1281
+#: forms.py:82 models.py:1212 models.py:1229 models.py:1278
msgid "Public domain"
msgstr ""
@@ -75,8 +75,8 @@ msgstr ""
msgid "Relation type"
msgstr ""
-#: forms.py:383 ishtar_menu.py:30 models.py:370 models.py:837 models.py:867
-#: models.py:895 models.py:998 models.py:1207 wizards.py:344 wizards.py:355
+#: forms.py:383 ishtar_menu.py:30 models.py:367 models.py:834 models.py:864
+#: models.py:892 models.py:995 models.py:1204 wizards.py:344 wizards.py:355
#: templates/ishtar/sheet_operation.html:4
msgid "Operation"
msgstr ""
@@ -101,11 +101,11 @@ msgstr ""
msgid "Deleted relations"
msgstr ""
-#: forms.py:451 templates/ishtar/sheet_operation.html:83
+#: forms.py:451 templates/ishtar/sheet_operation.html:95
msgid "Relations"
msgstr ""
-#: forms.py:456 forms.py:1226 models.py:276
+#: forms.py:456 forms.py:1226 models.py:273
msgid "Numeric reference"
msgstr ""
@@ -113,7 +113,7 @@ msgstr ""
msgid "Parcel (section/number/public domain)"
msgstr ""
-#: forms.py:465 forms.py:1269 models.py:838
+#: forms.py:465 forms.py:1269 models.py:835
#: templates/ishtar/dashboards/dashboard_operation.html:390
#: templates/ishtar/dashboards/dashboard_operation.html:411
#: templates/ishtar/dashboards/dashboard_operation.html:643
@@ -127,7 +127,7 @@ msgstr ""
msgid "Name"
msgstr ""
-#: forms.py:468 forms.py:672 forms.py:750 forms.py:1232 models.py:283
+#: forms.py:468 forms.py:672 forms.py:750 forms.py:1232 models.py:280
msgid "Operation type"
msgstr ""
@@ -135,24 +135,24 @@ msgstr ""
msgid "Is open?"
msgstr ""
-#: forms.py:478 forms.py:782 models.py:272
+#: forms.py:478 forms.py:782 models.py:269
msgid "In charge"
msgstr ""
-#: forms.py:485 models.py:992
+#: forms.py:485 models.py:989
msgid "Scientist in charge"
msgstr ""
-#: forms.py:487 forms.py:674 forms.py:772 models.py:270
+#: forms.py:487 forms.py:674 forms.py:772 models.py:267
msgid "Operator"
msgstr ""
-#: forms.py:496 forms.py:1102 models.py:90 models.py:285
+#: forms.py:496 forms.py:1102 models.py:90 models.py:282
#: templates/ishtar/blocks/window_tables/archaeologicalsites.html:10
msgid "Remains"
msgstr ""
-#: forms.py:497 forms.py:1080 forms.py:1099 models.py:88 models.py:291
+#: forms.py:497 forms.py:1080 forms.py:1099 models.py:88 models.py:288
#: templates/ishtar/blocks/window_tables/archaeologicalsites.html:9
msgid "Periods"
msgstr ""
@@ -185,19 +185,19 @@ msgstr ""
msgid "Abstract (full text search)"
msgstr ""
-#: forms.py:512 forms.py:840 models.py:339
+#: forms.py:512 forms.py:840 models.py:336
msgid "Comment about scientific documentation"
msgstr ""
-#: forms.py:513 forms.py:842 models.py:351
+#: forms.py:513 forms.py:842 models.py:348
msgid "Record quality"
msgstr ""
-#: forms.py:514 forms.py:807 models.py:303
+#: forms.py:514 forms.py:807 models.py:300
msgid "Report processing"
msgstr ""
-#: forms.py:516 forms.py:845 models.py:346
+#: forms.py:516 forms.py:845 models.py:343
msgid "Virtual operation"
msgstr ""
@@ -221,7 +221,7 @@ msgstr ""
msgid "Documentation deadline after"
msgstr ""
-#: forms.py:541 forms.py:830 models.py:358
+#: forms.py:541 forms.py:830 models.py:355
msgid "Documentation received"
msgstr ""
@@ -233,7 +233,7 @@ msgstr ""
msgid "Finds deadline after"
msgstr ""
-#: forms.py:547 forms.py:835 models.py:362
+#: forms.py:547 forms.py:835 models.py:359
msgid "Finds received"
msgstr ""
@@ -245,12 +245,12 @@ msgstr ""
msgid "Associated file"
msgstr ""
-#: forms.py:640 forms.py:933 models.py:504 models.py:894 models.py:1003
+#: forms.py:640 forms.py:933 models.py:501 models.py:891 models.py:1000
#: wizards.py:80
msgid "Archaeological file"
msgstr ""
-#: forms.py:647 forms.py:649 models.py:353
+#: forms.py:647 forms.py:649 models.py:350
msgid "Abstract"
msgstr ""
@@ -262,7 +262,7 @@ msgstr ""
msgid "years"
msgstr ""
-#: forms.py:654 models.py:256
+#: forms.py:654 models.py:253
msgid "Creation date"
msgstr ""
@@ -319,11 +319,11 @@ msgstr ""
msgid "General"
msgstr ""
-#: forms.py:748 models.py:336
+#: forms.py:748 models.py:333
msgid "Generic name"
msgstr ""
-#: forms.py:757 models.py:305
+#: forms.py:757 models.py:302
msgid "Old code"
msgstr ""
@@ -331,7 +331,7 @@ msgstr ""
msgid "Head scientist"
msgstr ""
-#: forms.py:779 models.py:335
+#: forms.py:779 models.py:332
msgid "Operator reference"
msgstr ""
@@ -339,23 +339,23 @@ msgstr ""
msgid "Total surface (m2)"
msgstr ""
-#: forms.py:800 models.py:54 models.py:259 models.py:1420
+#: forms.py:800 models.py:54 models.py:256 models.py:1417
msgid "Start date"
msgstr ""
-#: forms.py:802 models.py:261
+#: forms.py:802 models.py:258
msgid "Excavation end date"
msgstr ""
-#: forms.py:805 models.py:262
+#: forms.py:805 models.py:259
msgid "Report delivery date"
msgstr ""
-#: forms.py:827 models.py:355
+#: forms.py:827 models.py:352
msgid "Deadline for submission of the documentation"
msgstr ""
-#: forms.py:832 models.py:360
+#: forms.py:832 models.py:357
msgid "Deadline for submission of the finds"
msgstr ""
@@ -390,7 +390,7 @@ msgstr ""
msgid "Bad operation code"
msgstr ""
-#: forms.py:929 models.py:519
+#: forms.py:929 models.py:516
msgid "Operation code"
msgstr ""
@@ -398,20 +398,20 @@ msgstr ""
msgid "Preventive informations - excavation"
msgstr ""
-#: forms.py:956 models.py:289
+#: forms.py:956 models.py:286
#: templates/ishtar/dashboards/dashboard_operation.html:701
msgid "Cost (euros)"
msgstr ""
-#: forms.py:957 models.py:294
+#: forms.py:957 models.py:291
msgid "Scheduled man-days"
msgstr ""
-#: forms.py:959 models.py:297
+#: forms.py:959 models.py:294
msgid "Optional man-days"
msgstr ""
-#: forms.py:961 models.py:300
+#: forms.py:961 models.py:297
msgid "Effective man-days"
msgstr ""
@@ -419,23 +419,23 @@ msgstr ""
msgid "Preventive informations - diagnostic"
msgstr ""
-#: forms.py:974 models.py:319
+#: forms.py:974 models.py:316
msgid "Prescription on zoning"
msgstr ""
-#: forms.py:976 models.py:322
+#: forms.py:976 models.py:319
msgid "Prescription on large area"
msgstr ""
-#: forms.py:979 models.py:324
+#: forms.py:979 models.py:321
msgid "Prescription on geoarchaeological context"
msgstr ""
-#: forms.py:983 forms.py:1005 models.py:287 models.py:1026
+#: forms.py:983 forms.py:1005 models.py:284 models.py:1023
msgid "Towns"
msgstr ""
-#: forms.py:1012 models.py:1223 models.py:1418
+#: forms.py:1012 models.py:1220 models.py:1415
msgid "Parcel"
msgstr ""
@@ -447,8 +447,8 @@ msgstr ""
msgid "Remain type"
msgstr ""
-#: forms.py:1084 templates/ishtar/sheet_operation.html:164
-#: templates/ishtar/sheet_operation.html:195
+#: forms.py:1084 templates/ishtar/sheet_operation.html:176
+#: templates/ishtar/sheet_operation.html:207
msgid "Period"
msgstr ""
@@ -460,8 +460,8 @@ msgstr ""
msgid "This reference already exists."
msgstr ""
-#: forms.py:1157 models.py:95 models.py:343
-#: templates/ishtar/sheet_operation.html:94
+#: forms.py:1157 models.py:95 models.py:340
+#: templates/ishtar/sheet_operation.html:106
msgid "Archaeological sites"
msgstr ""
@@ -481,7 +481,7 @@ msgstr ""
msgid "Would you like to delete this operation?"
msgstr ""
-#: forms.py:1186 forms.py:1256 forms.py:1392 models.py:869 models.py:983
+#: forms.py:1186 forms.py:1256 forms.py:1392 models.py:866 models.py:980
msgid "Index"
msgstr ""
@@ -508,7 +508,7 @@ msgstr ""
msgid "You should select a document."
msgstr ""
-#: forms.py:1263 forms.py:1330 models.py:908 models.py:977
+#: forms.py:1263 forms.py:1330 models.py:905 models.py:974
msgid "Act type"
msgstr ""
@@ -516,7 +516,7 @@ msgstr ""
msgid "Indexed?"
msgstr ""
-#: forms.py:1270 forms.py:1335 models.py:1017
+#: forms.py:1270 forms.py:1335 models.py:1014
#: templates/ishtar/blocks/window_tables/administrativacts.html:10
msgid "Object"
msgstr ""
@@ -529,7 +529,7 @@ msgstr ""
msgid "You should select an administrative act."
msgstr ""
-#: forms.py:1338 models.py:1014
+#: forms.py:1338 models.py:1011
msgid "Signature date"
msgstr ""
@@ -585,7 +585,7 @@ msgstr ""
msgid "Deletion"
msgstr ""
-#: ishtar_menu.py:59 models.py:1033
+#: ishtar_menu.py:59 models.py:1030
#: templates/ishtar/sheet_administrativeact.html:4
msgid "Administrative act"
msgstr ""
@@ -610,16 +610,16 @@ msgstr ""
msgid "General informations"
msgstr ""
-#: ishtar_menu.py:139 models.py:371
+#: ishtar_menu.py:139 models.py:368
#: templates/ishtar/dashboards/dashboard_operation.html:8
msgid "Operations"
msgstr ""
-#: models.py:53 models.py:71 models.py:1882
+#: models.py:53 models.py:71 models.py:1879
msgid "Order"
msgstr ""
-#: models.py:55 models.py:1421
+#: models.py:55 models.py:1418
msgid "End date"
msgstr ""
@@ -675,369 +675,365 @@ msgstr ""
msgid "Reliable"
msgstr ""
-#: models.py:234
-msgid "Year - Index"
-msgstr ""
-
-#: models.py:235
+#: models.py:232
msgid "Associated file (label)"
msgstr ""
-#: models.py:236
+#: models.py:233
msgid "Operator name"
msgstr ""
-#: models.py:237
+#: models.py:234
msgid "Scientist (full name)"
msgstr ""
-#: models.py:238
+#: models.py:235
msgid "Associated file (external ID)"
msgstr ""
-#: models.py:239
+#: models.py:236
msgid "Scientist (title)"
msgstr ""
-#: models.py:240
+#: models.py:237
msgid "Scientist (surname)"
msgstr ""
-#: models.py:241
+#: models.py:238
msgid "Scientist (name)"
msgstr ""
-#: models.py:242
+#: models.py:239
msgid "Scientist - Organization (name)"
msgstr ""
-#: models.py:243
+#: models.py:240
msgid "In charge (title)"
msgstr ""
-#: models.py:244
+#: models.py:241
msgid "In charge (surname)"
msgstr ""
-#: models.py:245
+#: models.py:242
msgid "In charge (name)"
msgstr ""
-#: models.py:246
+#: models.py:243
msgid "In charge - Organization (name)"
msgstr ""
-#: models.py:251
+#: models.py:248
msgid "Archaeological sites (reference)"
msgstr ""
-#: models.py:258
+#: models.py:255
msgid "Closing date"
msgstr ""
-#: models.py:265
+#: models.py:262
msgid "In charge scientist"
msgstr ""
-#: models.py:280 models.py:1203
+#: models.py:277 models.py:1200
msgid "File"
msgstr ""
-#: models.py:284
+#: models.py:281
msgid "Surface (m2)"
msgstr ""
-#: models.py:337
+#: models.py:334
msgid "General comment"
msgstr ""
-#: models.py:340
+#: models.py:337
msgid "Cached name"
msgstr ""
-#: models.py:348
+#: models.py:345
msgid ""
"If checked, it means that this operation have not been officialy registered."
msgstr ""
-#: models.py:364
+#: models.py:361
msgid "Point"
msgstr ""
-#: models.py:365
+#: models.py:362
msgid "Multi polygon"
msgstr ""
-#: models.py:373
+#: models.py:370
msgid "Can view all Operations"
msgstr ""
-#: models.py:374
+#: models.py:371
msgid "Can view own Operation"
msgstr ""
-#: models.py:375
+#: models.py:372
msgid "Can add own Operation"
msgstr ""
-#: models.py:376
+#: models.py:373
msgid "Can change own Operation"
msgstr ""
-#: models.py:377
+#: models.py:374
msgid "Can delete own Operation"
msgstr ""
-#: models.py:378
+#: models.py:375
msgid "Can close Operation"
msgstr ""
-#: models.py:407
+#: models.py:404
msgid "OPE"
msgstr ""
-#: models.py:473
+#: models.py:470
msgid "Intercommunal"
msgstr ""
-#: models.py:505
+#: models.py:502
msgid "Code patriarche"
msgstr ""
-#: models.py:545
+#: models.py:542
msgid "This operation code already exists for this year"
msgstr ""
-#: models.py:570
+#: models.py:567
msgid "Number of parcels"
msgstr ""
-#: models.py:588
+#: models.py:585
msgid "Number of administrative acts"
msgstr ""
-#: models.py:596
+#: models.py:593
msgid "Number of indexed administrative acts"
msgstr ""
-#: models.py:604
+#: models.py:601
msgid "Number of context records"
msgstr ""
-#: models.py:640
+#: models.py:637
msgid "Number of finds"
msgstr ""
-#: models.py:685
+#: models.py:682
msgid "No type"
msgstr ""
-#: models.py:716
+#: models.py:713
msgid "Number of sources"
msgstr ""
-#: models.py:758 templates/ishtar/dashboards/dashboard_operation.html:309
+#: models.py:755 templates/ishtar/dashboards/dashboard_operation.html:309
#: templates/ishtar/dashboards/dashboard_operation.html:575
#: templates/ishtar/dashboards/dashboard_operation.html:611
msgid "Mean"
msgstr ""
-#: models.py:808
+#: models.py:805
msgid "Inverse relation"
msgstr ""
-#: models.py:812
+#: models.py:809
msgid "Operation relation type"
msgstr ""
-#: models.py:813
+#: models.py:810
msgid "Operation relation types"
msgstr ""
-#: models.py:826
+#: models.py:823
msgid "Operation record relation"
msgstr ""
-#: models.py:827
+#: models.py:824
msgid "Operation record relations"
msgstr ""
-#: models.py:873
+#: models.py:870
msgid "Operation documentation"
msgstr ""
-#: models.py:874
+#: models.py:871
msgid "Operation documentations"
msgstr ""
-#: models.py:877
+#: models.py:874
msgid "Can view all Operation sources"
msgstr ""
-#: models.py:879
+#: models.py:876
msgid "Can view own Operation source"
msgstr ""
-#: models.py:881
+#: models.py:878
msgid "Can add own Operation source"
msgstr ""
-#: models.py:883
+#: models.py:880
msgid "Can change own Operation source"
msgstr ""
-#: models.py:885
+#: models.py:882
msgid "Can delete own Operation source"
msgstr ""
-#: models.py:896 models.py:1008
+#: models.py:893 models.py:1005
msgid "Treatment request"
msgstr ""
-#: models.py:897 models.py:1013
+#: models.py:894 models.py:1010
msgid "Treatment"
msgstr ""
-#: models.py:899
+#: models.py:896
msgid "Intended to"
msgstr ""
-#: models.py:901
+#: models.py:898
msgid "Code"
msgstr ""
-#: models.py:904
+#: models.py:901
msgid "Associated template"
msgstr ""
-#: models.py:905
+#: models.py:902
msgid "Indexed"
msgstr ""
-#: models.py:909
+#: models.py:906
msgid "Act types"
msgstr ""
-#: models.py:981
+#: models.py:978
msgid "Person in charge of the operation"
msgstr ""
-#: models.py:987
+#: models.py:984
msgid "Archaeological preventive operator"
msgstr ""
-#: models.py:995
+#: models.py:992
msgid "Signatory"
msgstr ""
-#: models.py:1023
+#: models.py:1020
msgid "Departments"
msgstr ""
-#: models.py:1024
+#: models.py:1021
msgid "Cached values get from associated departments"
msgstr ""
-#: models.py:1027
+#: models.py:1024
msgid "Cached values get from associated towns"
msgstr ""
-#: models.py:1034 templates/ishtar/sheet_operation.html:102
-#: templates/ishtar/sheet_operation.html:138
+#: models.py:1031 templates/ishtar/sheet_operation.html:114
+#: templates/ishtar/sheet_operation.html:150
msgid "Administrative acts"
msgstr ""
-#: models.py:1037
+#: models.py:1034
msgid "Can view all Administrative acts"
msgstr ""
-#: models.py:1039
+#: models.py:1036
msgid "Can view own Administrative act"
msgstr ""
-#: models.py:1041
+#: models.py:1038
msgid "Can add own Administrative act"
msgstr ""
-#: models.py:1043
+#: models.py:1040
msgid "Can change own Administrative act"
msgstr ""
-#: models.py:1045
+#: models.py:1042
msgid "Can delete own Administrative act"
msgstr ""
-#: models.py:1054
+#: models.py:1051
#: templates/ishtar/blocks/window_tables/administrativacts.html:7
#: templates/ishtar/blocks/window_tables/archaeologicalsites.html:7
msgid "Ref."
msgstr ""
-#: models.py:1148
+#: models.py:1145
msgid "This index already exists for this year"
msgstr ""
-#: models.py:1216
+#: models.py:1213
msgid "External ID"
msgstr ""
-#: models.py:1219
+#: models.py:1216
msgid "External ID is set automatically"
msgstr ""
-#: models.py:1220
+#: models.py:1217
msgid "Address - Locality"
msgstr ""
-#: models.py:1416
+#: models.py:1413
msgid "Owner"
msgstr ""
-#: models.py:1424
+#: models.py:1421
msgid "Parcel owner"
msgstr ""
-#: models.py:1425
+#: models.py:1422
msgid "Parcel owners"
msgstr ""
-#: models.py:1451
+#: models.py:1448
msgid "Recorded"
msgstr ""
-#: models.py:1452
+#: models.py:1449
msgid "Effective"
msgstr ""
-#: models.py:1453
+#: models.py:1450
msgid "Active"
msgstr ""
-#: models.py:1454
+#: models.py:1451
msgid "Field completed"
msgstr ""
-#: models.py:1455
+#: models.py:1452
msgid "Associated report"
msgstr ""
-#: models.py:1456
+#: models.py:1453
msgid "Closed"
msgstr ""
-#: models.py:1457
+#: models.py:1454
msgid "Documented and closed"
msgstr ""
-#: models.py:1883
+#: models.py:1880
msgid "Is preventive"
msgstr ""
-#: models.py:1886
+#: models.py:1883
msgid "Operation type old"
msgstr ""
-#: models.py:1887
+#: models.py:1884
msgid "Operation types old"
msgstr ""
@@ -1096,7 +1092,7 @@ msgid ""
msgstr ""
#: templates/ishtar/sheet_administrativeact.html:36
-#: templates/ishtar/sheet_operation.html:38
+#: templates/ishtar/sheet_operation.html:50
msgid "Surface:"
msgstr ""
@@ -1109,91 +1105,95 @@ msgid "Patriarche OA code not yet recorded!"
msgstr ""
#: templates/ishtar/sheet_operation.html:27
-msgid "Last modification date:"
+msgid "Creation:"
msgstr ""
#: templates/ishtar/sheet_operation.html:34
+msgid "Modification:"
+msgstr ""
+
+#: templates/ishtar/sheet_operation.html:46
msgid "State:"
msgstr ""
-#: templates/ishtar/sheet_operation.html:34
+#: templates/ishtar/sheet_operation.html:46
msgid "Active file"
msgstr ""
-#: templates/ishtar/sheet_operation.html:35
+#: templates/ishtar/sheet_operation.html:47
msgid "Closed operation"
msgstr ""
-#: templates/ishtar/sheet_operation.html:36
+#: templates/ishtar/sheet_operation.html:48
msgid "Closing date:"
msgstr ""
-#: templates/ishtar/sheet_operation.html:36
+#: templates/ishtar/sheet_operation.html:48
msgid "by"
msgstr ""
-#: templates/ishtar/sheet_operation.html:39
+#: templates/ishtar/sheet_operation.html:51
msgid "Cost:"
msgstr ""
-#: templates/ishtar/sheet_operation.html:40
+#: templates/ishtar/sheet_operation.html:52
msgid "Duration:"
msgstr ""
-#: templates/ishtar/sheet_operation.html:40
+#: templates/ishtar/sheet_operation.html:52
msgid "Day"
msgstr ""
-#: templates/ishtar/sheet_operation.html:73
+#: templates/ishtar/sheet_operation.html:85
msgid "Localisation"
msgstr ""
-#: templates/ishtar/sheet_operation.html:98
+#: templates/ishtar/sheet_operation.html:110
msgid "Associated parcels"
msgstr ""
-#: templates/ishtar/sheet_operation.html:106
+#: templates/ishtar/sheet_operation.html:118
msgid "Document from this operation"
msgstr ""
-#: templates/ishtar/sheet_operation.html:112
-#: templates/ishtar/sheet_operation.html:149
+#: templates/ishtar/sheet_operation.html:124
+#: templates/ishtar/sheet_operation.html:161
msgid "Context records"
msgstr ""
-#: templates/ishtar/sheet_operation.html:116
+#: templates/ishtar/sheet_operation.html:128
msgid "Context record relations"
msgstr ""
-#: templates/ishtar/sheet_operation.html:121
+#: templates/ishtar/sheet_operation.html:133
msgid "Documents from associated context records"
msgstr ""
-#: templates/ishtar/sheet_operation.html:126
-#: templates/ishtar/sheet_operation.html:172
+#: templates/ishtar/sheet_operation.html:138
+#: templates/ishtar/sheet_operation.html:184
msgid "Finds"
msgstr ""
-#: templates/ishtar/sheet_operation.html:131
+#: templates/ishtar/sheet_operation.html:143
msgid "Documents from associated finds"
msgstr ""
-#: templates/ishtar/sheet_operation.html:136
+#: templates/ishtar/sheet_operation.html:148
msgid "Statistics"
msgstr ""
-#: templates/ishtar/sheet_operation.html:156
-#: templates/ishtar/sheet_operation.html:210
+#: templates/ishtar/sheet_operation.html:168
+#: templates/ishtar/sheet_operation.html:222
#: templates/ishtar/blocks/window_tables/administrativacts.html:8
msgid "Type"
msgstr ""
-#: templates/ishtar/sheet_operation.html:156
-#: templates/ishtar/sheet_operation.html:164
-#: templates/ishtar/sheet_operation.html:179
-#: templates/ishtar/sheet_operation.html:187
-#: templates/ishtar/sheet_operation.html:195
-#: templates/ishtar/sheet_operation.html:210
+#: templates/ishtar/sheet_operation.html:168
+#: templates/ishtar/sheet_operation.html:176
+#: templates/ishtar/sheet_operation.html:191
+#: templates/ishtar/sheet_operation.html:199
+#: templates/ishtar/sheet_operation.html:207
+#: templates/ishtar/sheet_operation.html:222
#: templates/ishtar/dashboards/dashboard_operation.html:18
#: templates/ishtar/dashboards/dashboard_operation.html:164
#: templates/ishtar/dashboards/dashboard_operation.html:432
@@ -1202,19 +1202,19 @@ msgstr ""
msgid "Number"
msgstr ""
-#: templates/ishtar/sheet_operation.html:179
+#: templates/ishtar/sheet_operation.html:191
msgid "Material type"
msgstr ""
-#: templates/ishtar/sheet_operation.html:187
+#: templates/ishtar/sheet_operation.html:199
msgid "Object type"
msgstr ""
-#: templates/ishtar/sheet_operation.html:203
+#: templates/ishtar/sheet_operation.html:215
msgid "Sources"
msgstr ""
-#: templates/ishtar/sheet_operation.html:219
+#: templates/ishtar/sheet_operation.html:231
msgid "Finds by context records"
msgstr ""
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index e74d02647..bc2169009 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -177,9 +177,8 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms,
ValueGetter, ShortMenuItem, DashboardFormItem):
QUALITY_DICT = dict(QUALITY)
SHOW_URL = 'show-operation'
- TABLE_COLS = ['year_index', 'operation_type', 'remains', 'towns',
- 'associated_file_short_label', 'start_date',
- 'excavation_end_date']
+ TABLE_COLS = ['year', 'towns', 'common_name', 'operation_type',
+ 'start_date', 'excavation_end_date', 'remains']
IMAGE_PREFIX = 'operations/'
SLUG = 'operation'
@@ -200,7 +199,6 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms,
'scientific_documentation_comment__icontains',
'abstract': 'abstract__icontains',
'end_date': 'end_date__isnull',
- 'year_index': ('year', 'operation_code'),
'start_before': 'start_date__lte',
'start_after': 'start_date__gte',
'end_before': 'excavation_end_date__lte',
@@ -231,7 +229,6 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms,
EXTRA_FULL_FIELDS_LABELS = {
'full_code_patriarche': u"Code patriarche",
- 'year_index': _(u"Year - Index"),
'associated_file_short_label': _(u"Associated file (label)"),
'operator__name': _(u"Operator name"),
'scientist__raw_name': _(u"Scientist (full name)"),
diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html
index 28e4ae6b5..d3eb980c4 100644
--- a/archaeological_operations/templates/ishtar/sheet_operation.html
+++ b/archaeological_operations/templates/ishtar/sheet_operation.html
@@ -24,8 +24,20 @@
<h3>{% trans "General"%}</h3>
<ul class='form-flex'>
{% field_li "Old code" item.old_code %}
-<li><label>{%trans "Last modification date:"%}</label> <span class='value'>{% if item.history_date %}{{ item.history_date }}{% else %}{{ item.history.all.0.history_date }}{% endif %}</span></li> <!-- date = now -->
-{% field_li_detail "Created by" item.history_creator.ishtaruser.person %}
+ <li><label>{%trans "Creation:"%}</label>
+ <span class='value'>
+ {{item.history_creator.ishtaruser.person}}<br/>
+ <small><em>{{item.history_creation_date|date:"DATETIME_FORMAT"}}</em></small>
+ </span>
+ </li>
+ {% if item.history_creation_date != item.last_edition_date %}
+ <li><label>{%trans "Modification:"%}</label>
+ <span class='value'>
+ {{item.history_modifier.ishtaruser.person}}<br/>
+ <small><em>{% firstof item.history_date|date:"DATETIME_FORMAT" item.history.all.0.history_date|date:"DATETIME_FORMAT" %}</em></small>
+ </span>
+ </li>
+ {% endif %}
{% field_li "Begining date" item.start_date %}
{% field_li "Excavation end date" item.excavation_end_date|default:"-" %}
{% field_li_detail "Head scientist" item.scientist %}
diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py
index 23c32434b..1b64f581d 100644
--- a/archaeological_operations/tests.py
+++ b/archaeological_operations/tests.py
@@ -298,35 +298,54 @@ class ImportOperationTest(ImportTest, TestCase):
impt.importation()
# new parcels has now been imported
current_nb = models.Parcel.objects.count()
- self.assertEqual(current_nb, old_nb + 2)
+ self.assertEqual(current_nb, old_nb + 3)
# and well imported
- last_parcels = models.Parcel.objects.order_by('-pk').all()[0:2]
- external_ids = sorted(['4200-59350-YY55', '4200-75101-XXXX'])
- parcel_numbers = sorted(['42', '55'])
- sections = sorted(['ZX', 'YY'])
+ last_parcels = models.Parcel.objects.order_by('-pk').all()[0:3]
+ external_ids = sorted(['4200-59350-YY55', '4200-75101-XXXX',
+ '4201-59350-YY55'])
+ parcel_numbers = sorted(['42', '55', '55'])
+ sections = sorted(['ZX', 'YY', 'YY'])
self.assertEqual(external_ids,
sorted([p.external_id for p in last_parcels]))
self.assertEqual(parcel_numbers,
sorted([p.parcel_number for p in last_parcels]))
self.assertEqual(sections,
sorted([p.section for p in last_parcels]))
- last_ope = models.Operation.objects.order_by('-pk').all()[0]
- towns_ope = last_ope.towns.all()
+ ope1 = models.Operation.objects.filter(code_patriarche=4200).all()[0]
+ towns_ope = ope1.towns.all()
imported = [imp for acc, imp in impt.get_all_imported()]
for p in last_parcels:
self.assertTrue(p.town in towns_ope)
self.assertTrue(p in imported)
self.assertEqual(len(imported), len(last_parcels))
- self.assertEqual(models.Parcel.objects.get(parcel_number='55',
- section='YY').external_id,
- '4200-59350-YY55')
+ self.assertEqual(
+ models.Parcel.objects.get(
+ parcel_number='55', section='YY',
+ operation_id=ope1.pk).external_id,
+ '4200-59350-YY55')
+ # cached_label update
+ ope2 = models.Operation.objects.filter(code_patriarche=4201).all()[0]
+ self.assertIn('LILLE', ope2.cached_label.upper())
# delete associated parcel with the import deletion
parcel_count = models.Parcel.objects.count()
impt.delete()
- self.assertEqual(parcel_count - 2, models.Parcel.objects.count())
+ self.assertEqual(parcel_count - 3, models.Parcel.objects.count())
+
+
+class ParcelTest(ImportTest, TestCase):
+ fixtures = [settings.ROOT_PATH +
+ '../fixtures/initial_data-auth-fr.json',
+ settings.ROOT_PATH +
+ '../ishtar_common/fixtures/initial_data-fr.json',
+ settings.ROOT_PATH +
+ '../ishtar_common/fixtures/test_towns.json',
+ settings.ROOT_PATH +
+ '../ishtar_common/fixtures/initial_importtypes-fr.json',
+ settings.ROOT_PATH +
+ '../archaeological_operations/fixtures/initial_data-fr.json']
- def testParseParcels(self):
+ def test_parse_parcels(self):
# the database needs to be initialised before importing
from archaeological_operations.import_from_csv import parse_parcels
# default_town = Town.objects.create(numero_insee="12345",
@@ -875,17 +894,18 @@ class OperationSearchTest(TestCase, OperationInitTest):
self.operations += self.create_operation(self.alt_user, self.orgas[0])
self.item = self.operations[0]
- def testBaseSearch(self):
+ def test_base_search(self):
c = Client()
response = c.get(reverse('get-operation'), {'year': '2010'})
- # 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-operation'), {'year': '2010'})
- self.assertTrue(json.loads(response.content)['total'] == 2)
+ self.assertEqual(json.loads(response.content)['total'], 2)
response = c.get(reverse('get-operation'),
{'operator': self.orgas[0].pk})
- self.assertTrue(json.loads(response.content)['total'] == 2)
+ result = json.loads(response.content)
+ self.assertEqual(result['total'], 2)
def create_relations(self):
rel1 = models.RelationType.objects.create(
diff --git a/archaeological_operations/tests/MCC-parcelles-example.csv b/archaeological_operations/tests/MCC-parcelles-example.csv
index 4104124b5..2d80854f0 100644
--- a/archaeological_operations/tests/MCC-parcelles-example.csv
+++ b/archaeological_operations/tests/MCC-parcelles-example.csv
@@ -1,3 +1,4 @@
code OA,numero INSEE commune,identifiant parcelle,numero parcelle,section cadastre,annee cadastre,nom commune,nom departement,lieu dit adresse
4200,75101,XXXX,42,ZX,,Paris,Ile-de-France,1 rue de l'Église
4200,59350,YY55,55,YY,,Lille,Nord,Patis du tertre
+4201,59350,YY55,55,YY,,Lille,Nord,Patis du tertre