diff options
Diffstat (limited to 'archaeological_operations')
-rw-r--r-- | archaeological_operations/forms.py | 4 | ||||
-rw-r--r-- | archaeological_operations/locale/fr/LC_MESSAGES/django.po | 466 | ||||
-rw-r--r-- | archaeological_operations/migrations/0012_auto.py | 415 | ||||
-rw-r--r-- | archaeological_operations/migrations/0013_auto__add_field_acttype_code.py | 413 | ||||
-rw-r--r-- | archaeological_operations/models.py | 26 | ||||
-rw-r--r-- | archaeological_operations/urls.py | 3 | ||||
-rw-r--r-- | archaeological_operations/views.py | 26 | ||||
-rw-r--r-- | archaeological_operations/wizards.py | 55 |
8 files changed, 1178 insertions, 230 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index 50a5e7f5f..955b2f825 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -613,3 +613,7 @@ class FinalAdministrativeActDeleteForm(FinalForm): confirm_msg = " " confirm_end_msg = _(u"Would you like to delete this administrative act?") +class GenerateDocForm(forms.Form): + form_label = _("Doc generation") + doc_generation = forms.BooleanField(required=False, + label=_(u"Generate the associated doc?")) diff --git a/archaeological_operations/locale/fr/LC_MESSAGES/django.po b/archaeological_operations/locale/fr/LC_MESSAGES/django.po index d217eccf3..7cb55c4bb 100644 --- a/archaeological_operations/locale/fr/LC_MESSAGES/django.po +++ b/archaeological_operations/locale/fr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: alpha\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-10-28 01:40+0100\n" +"POT-Creation-Date: 2013-12-05 01:35+0100\n" "PO-Revision-Date: 2010-12-09\n" "Last-Translator: Étienne Loks <etienne.loks at peacefrogs net>\n" "Language-Team: \n" @@ -18,12 +18,12 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n>1;\n" -#: forms.py:62 forms.py:185 forms.py:416 forms.py:437 forms.py:441 -#: models.py:387 templates/ishtar/sheet_operation.html:78 +#: forms.py:62 forms.py:187 forms.py:420 forms.py:441 forms.py:445 +#: models.py:449 templates/ishtar/sheet_operation.html:84 msgid "Parcels" msgstr "Parcelles" -#: forms.py:65 forms.py:394 models.py:381 +#: forms.py:65 forms.py:398 models.py:443 #: templates/ishtar/dashboards/dashboard_operation.html:302 #: templates/ishtar/dashboards/dashboard_operation.html:315 #: templates/ishtar/dashboards/dashboard_operation.html:482 @@ -31,17 +31,17 @@ msgstr "Parcelles" msgid "Town" msgstr "Commune" -#: forms.py:67 forms.py:203 forms.py:299 models.py:87 models.py:379 -#: templates/ishtar/sheet_operation.html:76 -#: templates/ishtar/sheet_operation.html:97 +#: forms.py:67 forms.py:205 forms.py:303 models.py:91 models.py:441 +#: templates/ishtar/sheet_operation.html:82 +#: templates/ishtar/sheet_operation.html:103 msgid "Year" msgstr "Année" -#: forms.py:70 models.py:382 templates/ishtar/sheet_operation.html:77 +#: forms.py:70 models.py:444 templates/ishtar/sheet_operation.html:83 msgid "Section" msgstr "Section" -#: forms.py:72 models.py:383 +#: forms.py:72 models.py:445 msgid "Parcel number" msgstr "Numéro de parcelle" @@ -57,115 +57,119 @@ msgstr "Saisie libre" msgid "example: \"2013: XD:1 to 13,24,33 to 39, YD:24\" or \"AB:24,AC:42\"" msgstr "exemple : \"2013: XD:1 à 13,24,33 à 39, YD:24\" ou \"AB:24,AC:42\"" -#: forms.py:179 +#: forms.py:181 msgid "There are identical parcels." msgstr "Il y a des parcelles identiques." -#: forms.py:188 +#: forms.py:190 msgid "Name (full text search)" msgstr "Nom (recherche texte intégral)" -#: forms.py:193 forms.py:289 forms.py:536 models.py:41 models.py:94 +#: forms.py:195 forms.py:291 forms.py:540 models.py:43 models.py:98 msgid "Operation type" msgstr "Type d'opération" -#: forms.py:200 models.py:85 +#: forms.py:202 models.py:89 msgid "In charge" msgstr "Responsable" -#: forms.py:201 models.py:96 +#: forms.py:203 models.py:100 msgid "Remains" msgstr "Vestiges" -#: forms.py:202 forms.py:466 forms.py:485 models.py:99 -#: templates/ishtar/sheet_operation.html:166 +#: forms.py:204 forms.py:470 forms.py:489 models.py:103 +#: templates/ishtar/sheet_operation.html:158 msgid "Periods" msgstr "Périodes" -#: forms.py:204 +#: forms.py:206 msgid "Started before" msgstr "Commencé avant" -#: forms.py:206 +#: forms.py:208 msgid "Started after" msgstr "Commencé après" -#: forms.py:208 +#: forms.py:210 msgid "Ended before" msgstr "Terminé avant" -#: forms.py:210 +#: forms.py:212 msgid "Ended after" msgstr "Terminé après" -#: forms.py:212 +#: forms.py:214 msgid "Parcel (section/number)" msgstr "Parcelle (section/numéro)" -#: forms.py:213 +#: forms.py:215 msgid "Is open?" msgstr "Est ouvert ?" -#: forms.py:232 forms.py:530 views.py:134 +#: forms.py:234 forms.py:534 views.py:136 msgid "Operation search" msgstr "Recherche d'opérations" -#: forms.py:244 forms.py:532 +#: forms.py:246 forms.py:536 msgid "You should select an operation." msgstr "Vous devez sélectionner une opération." -#: forms.py:272 forms.py:586 templates/ishtar/sheet_operation.html:20 +#: forms.py:274 forms.py:590 templates/ishtar/sheet_operation.html:26 msgid "General" msgstr "Général" -#: forms.py:278 models.py:330 +#: forms.py:280 models.py:371 msgid "Person in charge of the operation" msgstr "Responsable d'opération" -#: forms.py:285 models.py:190 models.py:313 models.py:343 +#: forms.py:287 models.py:351 models.py:384 wizards.py:78 msgid "Archaelogical file" msgstr "Dossier archéologique" -#: forms.py:291 models.py:63 models.py:80 models.py:433 +#: forms.py:293 models.py:65 models.py:82 models.py:495 msgid "Start date" msgstr "Date de début" -#: forms.py:293 models.py:81 +#: forms.py:295 models.py:83 msgid "Excavation end date" msgstr "Date de fin de chantier" -#: forms.py:296 +#: forms.py:297 models.py:86 +msgid "Report delivery date" +msgstr "Date de livraison du rapport" + +#: forms.py:300 msgid "Total surface (m²)" msgstr "Surface totale des terrains (m²)" -#: forms.py:303 models.py:88 models.py:218 +#: forms.py:307 models.py:92 models.py:252 msgid "Operation code" msgstr "Code de l'opération" -#: forms.py:306 models.py:131 +#: forms.py:310 models.py:135 msgid "Generic name" msgstr "Nom générique" -#: forms.py:308 models.py:129 +#: forms.py:312 models.py:133 msgid "Operator reference" msgstr "Référence de l'opérateur" -#: forms.py:328 models.py:133 +#: forms.py:332 models.py:137 msgid "Comment" msgstr "Commentaire" -#: forms.py:341 +#: forms.py:345 msgid "" "If you want to set an excavation end date you have to provide a start date." msgstr "" "Avant de renseigner la date de fin de chantier, il est nécessaire de " "renseigner une date de début." -#: forms.py:344 +#: forms.py:348 msgid "The excavation end date cannot be before the start date." msgstr "La date de fin de chantier ne peut être avant la date de début." -#: forms.py:358 +#: forms.py:362 #, python-format msgid "" "Operation code already exist for year: %(year)d - use a value bigger than " @@ -174,90 +178,90 @@ msgstr "" "Ce code d'opération existe déjà pour l'année %(year)d - utilisez une valeur " "plus grande que %(last_val)d" -#: forms.py:362 +#: forms.py:366 msgid "Bad operation code" msgstr "Mauvais code d'opération" -#: forms.py:367 +#: forms.py:371 msgid "Preventive informations - excavation" msgstr "Information archéologie préventive - fouille" -#: forms.py:368 models.py:98 +#: forms.py:372 models.py:102 #: templates/ishtar/dashboards/dashboard_operation.html:495 msgid "Cost (€)" msgstr "Cout (€)" -#: forms.py:369 models.py:100 +#: forms.py:373 models.py:104 msgid "Scheduled man-days" msgstr "Jours-hommes prévus" -#: forms.py:371 models.py:102 +#: forms.py:375 models.py:106 msgid "Optional man-days" msgstr "Jours-hommes optionnels" -#: forms.py:373 models.py:104 +#: forms.py:377 models.py:108 msgid "Effective man-days" msgstr "Jours-hommes effectifs" -#: forms.py:382 +#: forms.py:386 msgid "Preventive informations - diagnostic" msgstr "Information archéologie préventive - diagnostic" -#: forms.py:385 models.py:117 +#: forms.py:389 models.py:121 msgid "Prescription on zoning" msgstr "Prescription sur zonage" -#: forms.py:387 models.py:119 +#: forms.py:391 models.py:123 msgid "Prescription on large area" msgstr "Prescription sur une vaste surface" -#: forms.py:389 models.py:121 +#: forms.py:393 models.py:125 msgid "Prescription on geoarchaeological context" msgstr "Prescription sur un contexte géoarchéologique" -#: forms.py:392 forms.py:413 models.py:97 +#: forms.py:396 forms.py:417 models.py:101 msgid "Towns" msgstr "Communes" -#: forms.py:418 models.py:386 models.py:432 -#: templates/ishtar/sheet_operation.html:142 -#: templates/ishtar/sheet_operation.html:170 +#: forms.py:422 models.py:448 models.py:494 +#: templates/ishtar/sheet_operation.html:130 +#: templates/ishtar/sheet_operation.html:162 msgid "Parcel" msgstr "Parcelle" -#: forms.py:444 forms.py:463 models.py:58 +#: forms.py:448 forms.py:467 models.py:60 msgid "Remain types" msgstr "Types de vestige" -#: forms.py:447 models.py:57 +#: forms.py:451 models.py:59 msgid "Remain type" msgstr "Type de vestige" -#: forms.py:459 +#: forms.py:463 msgid "There are identical remain types" msgstr "Il y a des types de vestige identiques." -#: forms.py:469 +#: forms.py:473 msgid "Period" msgstr "Période" -#: forms.py:481 +#: forms.py:485 msgid "There are identical periods" msgstr "Il y a des périodes identiques." -#: forms.py:489 +#: forms.py:493 msgid "Would you like to close this operation?" msgstr "Voulez vous clore cette opération ?" -#: forms.py:493 +#: forms.py:497 msgid "Would you like to delete this operation?" msgstr "Voulez vous supprimer cette opération ?" -#: forms.py:501 models.py:308 +#: forms.py:505 models.py:342 msgid "Index" msgstr "Index" -#: forms.py:524 +#: forms.py:528 #, python-format msgid "" "Index already exist for operation: %(operation)s - use a value bigger than " @@ -266,52 +270,60 @@ msgstr "" "Cet index existe déjà pour l'opération : %(operation)s, utilisez une valeur " "plus grande que %(last_val)d" -#: forms.py:535 +#: forms.py:539 msgid "Operation's town" msgstr "Commune de l'opération" -#: forms.py:538 +#: forms.py:542 msgid "Operation's year" msgstr "Année de l'opération" -#: forms.py:549 +#: forms.py:553 msgid "Documentation search" msgstr "Recherche de document" -#: forms.py:551 +#: forms.py:555 msgid "You should select a document." msgstr "Vous devez sélectionner un document." -#: forms.py:559 forms.py:589 models.py:319 models.py:328 +#: forms.py:563 forms.py:593 models.py:360 models.py:369 msgid "Act type" msgstr "Type d'acte" -#: forms.py:569 +#: forms.py:573 msgid "Administrative act search" msgstr "Recherche d'actes administratifs" -#: forms.py:581 +#: forms.py:585 msgid "You should select an administrative act." msgstr "Vous devez sélectionner un acte administratif." -#: forms.py:590 models.py:337 +#: forms.py:594 models.py:378 msgid "Signatory" msgstr "Signataire" -#: forms.py:594 models.py:346 +#: forms.py:598 models.py:387 msgid "Object" msgstr "Objet" -#: forms.py:596 models.py:344 +#: forms.py:600 models.py:385 msgid "Signature date" msgstr "Date de signature" -#: forms.py:610 +#: forms.py:614 msgid "Would you like to delete this administrative act?" msgstr "Voulez vous supprimer cet acte administratif ?" -#: ishtar_menu.py:27 models.py:139 models.py:295 models.py:306 models.py:314 -#: models.py:339 models.py:378 +#: forms.py:617 +msgid "Doc generation" +msgstr "Generation de document" + +#: forms.py:619 +msgid "Generate the associated doc?" +msgstr "Générer le document associé ?" + +#: ishtar_menu.py:27 models.py:143 models.py:329 models.py:340 models.py:352 +#: models.py:380 models.py:440 templates/ishtar/sheet_operation.html:6 msgid "Operation" msgstr "Opération" @@ -335,7 +347,7 @@ msgstr "Clotûre" msgid "Deletion" msgstr "Suppression" -#: ishtar_menu.py:51 models.py:353 +#: ishtar_menu.py:51 models.py:395 msgid "Administrative act" msgstr "Acte administratif" @@ -355,223 +367,235 @@ msgstr "Tableau de bord" msgid "General informations" msgstr "Informations générales" -#: ishtar_menu.py:94 models.py:140 +#: ishtar_menu.py:94 models.py:144 #: templates/ishtar/dashboards/dashboard_operation.html:9 msgid "Operations" msgstr "Opérations" -#: models.py:39 +#: models.py:41 msgid "Is preventive" msgstr "Préventif" -#: models.py:42 +#: models.py:44 msgid "Operation types" msgstr "Types d'opération" -#: models.py:62 +#: models.py:64 msgid "Order" msgstr "Ordre" -#: models.py:64 models.py:434 +#: models.py:66 models.py:496 msgid "End date" msgstr "Date de fin" -#: models.py:65 +#: models.py:67 msgid "Parent period" msgstr "Période parente" -#: models.py:69 +#: models.py:71 msgid "Type Period" msgstr "Type de période" -#: models.py:70 +#: models.py:72 msgid "Types Period" msgstr "Types de période" -#: models.py:83 +#: models.py:85 msgid "Closing date" msgstr "Date de clotûre" -#: models.py:92 models.py:376 +#: models.py:96 models.py:438 msgid "File" msgstr "Dossier" -#: models.py:95 +#: models.py:99 msgid "Surface (m²)" msgstr "Area (m²)" -#: models.py:134 +#: models.py:138 msgid "Cached name" msgstr "Nom en cache" -#: models.py:142 +#: models.py:146 msgid "Can view all Operation" msgstr "Peut voir toutes les Opérations" -#: models.py:143 +#: models.py:147 msgid "Can view own Operation" msgstr "Peut voir sa propre Opération" -#: models.py:144 +#: models.py:148 msgid "Can add own Operation" msgstr "Peut ajouter sa propre Opération" -#: models.py:145 +#: models.py:149 msgid "Can change own Operation" msgstr "Peut changer sa propre Opération" -#: models.py:146 +#: models.py:150 msgid "Can delete own Operation" msgstr "Peut supprimer sa propre Opération" -#: models.py:157 +#: models.py:161 msgid "OPE" msgstr "OPE" -#: models.py:176 +#: models.py:198 msgid "Intercommunal" msgstr "Intercommunal" -#: models.py:233 +#: models.py:224 +msgid "Archaeological file" +msgstr "Dossier archéologique" + +#: models.py:267 msgid "This operation code already exists for this year" msgstr "Cet code d'opération existe déjà pour cette année." -#: models.py:296 templates/ishtar/dashboards/dashboard_operation.html:273 +#: models.py:330 templates/ishtar/dashboards/dashboard_operation.html:273 #: templates/ishtar/dashboards/dashboard_operation.html:286 #: templates/ishtar/dashboards/dashboard_operation.html:453 #: templates/ishtar/dashboards/dashboard_operation.html:466 msgid "Department" msgstr "Département" -#: models.py:304 +#: models.py:338 msgid "Operation documentation" msgstr "Documentation d'une opération" -#: models.py:305 +#: models.py:339 msgid "Operation documentations" msgstr "Documentations des opérations" -#: models.py:316 +#: models.py:354 msgid "Intended to" msgstr "Destiné à" -#: models.py:320 +#: models.py:356 +msgid "Code" +msgstr "Code" + +#: models.py:358 +msgid "Associated template" +msgstr "Patron associé" + +#: models.py:361 msgid "Act types" msgstr "Types d'acte" -#: models.py:332 +#: models.py:373 msgid "Archaeological preventive operator" msgstr "Opérateur d'archéologie préventive" -#: models.py:335 +#: models.py:376 msgid "Person in charge of the scientific part" msgstr "Responsable scientifique" -#: models.py:354 templates/ishtar/sheet_operation.html:95 +#: models.py:396 templates/ishtar/sheet_operation.html:101 msgid "Administrative acts" msgstr "Actes administratifs" -#: models.py:357 +#: models.py:399 msgid "Can view all Administrative act" msgstr "Peut voir tout les Actes administratifs" -#: models.py:359 +#: models.py:401 msgid "Can view own Administrative act" msgstr "Peut voir son propre Acte administratif" -#: models.py:361 +#: models.py:403 msgid "Can add own Administrative act" msgstr "Peut ajouter son propre Acte administratif" -#: models.py:363 +#: models.py:405 msgid "Can change own Administrative act" msgstr "Peut changer son propre Acte administratif" -#: models.py:365 +#: models.py:407 msgid "Can delete own Administrative act" msgstr "Peut supprimer son propre Acte administratif" -#: models.py:431 +#: models.py:493 msgid "Owner" msgstr "Propriétaire" -#: models.py:437 +#: models.py:499 msgid "Parcel owner" msgstr "Propriétaire de parcelle" -#: models.py:438 +#: models.py:500 msgid "Parcel owners" msgstr "Propriétaires de parcelle" -#: models.py:462 +#: models.py:524 msgid "Recorded" msgstr "Enregistré" -#: models.py:463 +#: models.py:525 msgid "Effective" msgstr "Effectif" -#: models.py:464 +#: models.py:526 msgid "Active" msgstr "Actif" -#: models.py:465 +#: models.py:527 msgid "Field completed" msgstr "Terrain achevé" -#: models.py:466 +#: models.py:528 msgid "Associated report" msgstr "Rapport associé" -#: models.py:467 +#: models.py:529 msgid "Closed" msgstr "Fermé" -#: models.py:468 +#: models.py:530 msgid "Documented and closed" msgstr "Documenté et clôt" -#: views.py:148 +#: views.py:150 msgid "New operation" msgstr "Nouvelle opération" -#: views.py:179 +#: views.py:181 msgid "Operation modification" msgstr "Modification d'une opération" -#: views.py:202 +#: views.py:204 msgid "Operation closing" msgstr "Clotûre de l'opération" -#: views.py:208 +#: views.py:210 msgid "Operation deletion" msgstr "Suppression d'une opération" -#: views.py:216 +#: views.py:218 msgid "Operation: source creation" msgstr "Operation : nouvelle documentation associée" -#: views.py:224 +#: views.py:226 msgid "Operation: source modification" msgstr "Operation : modification d'une documentation associée" -#: views.py:230 +#: views.py:232 msgid "Operation: source deletion" msgstr "Operation : suppression d'une documentation associée" -#: views.py:239 +#: views.py:241 msgid "Operation: new administrative act" msgstr "Operation : nouvel acte administratif" -#: views.py:249 +#: views.py:251 msgid "Operation: administrative act modification" msgstr "Operation : modification d'un acte administratif" -#: views.py:258 +#: views.py:260 msgid "Operation: administrative act deletion" msgstr "Operation : suppression d'un acte administratif" -#: wizards.py:142 +#: wizards.py:158 msgid "" "Warning: No Archaelogical File is provided. If you have forget it return to " "the first step." @@ -579,293 +603,279 @@ msgstr "" "Attention : Aucun dossier archéologique n'a été précisé. S'il s'agit d'un " "oubli, définissez le à la première étape." -#: templates/ishtar/sheet_operation.html:8 +#: templates/ishtar/sheet_operation.html:14 msgid "Previous version" msgstr "Version précédente" -#: templates/ishtar/sheet_operation.html:12 +#: templates/ishtar/sheet_operation.html:18 msgid "Are you sure to rollback to this version?" msgstr "Êtes vous sûr de vouloir revenir à cette version ?" -#: templates/ishtar/sheet_operation.html:13 +#: templates/ishtar/sheet_operation.html:19 msgid "Next version" msgstr "Version suivante" -#: templates/ishtar/sheet_operation.html:18 +#: templates/ishtar/sheet_operation.html:24 msgid "Export as:" msgstr "Exporter en :" -#: templates/ishtar/sheet_operation.html:18 +#: templates/ishtar/sheet_operation.html:24 msgid "OpenOffice.org file" msgstr "Fichier OpenOffice.org" -#: templates/ishtar/sheet_operation.html:18 +#: templates/ishtar/sheet_operation.html:24 msgid "PDF file" msgstr "Fichier PDF" -#: templates/ishtar/sheet_operation.html:21 +#: templates/ishtar/sheet_operation.html:27 msgid "Name:" msgstr "Nom :" -#: templates/ishtar/sheet_operation.html:22 +#: templates/ishtar/sheet_operation.html:28 msgid "Year:" msgstr "Année :" -#: templates/ishtar/sheet_operation.html:23 +#: templates/ishtar/sheet_operation.html:29 msgid "Numerical reference:" msgstr "Identifiant numérique :" -#: templates/ishtar/sheet_operation.html:25 +#: templates/ishtar/sheet_operation.html:31 msgid "Patriarche OA code:" msgstr "Code d'opération Patriarche" -#: templates/ishtar/sheet_operation.html:26 +#: templates/ishtar/sheet_operation.html:32 msgid "Patriarche OA code not yet recorded!" msgstr "Code d'opération Patriarche non renseigné !" -#: templates/ishtar/sheet_operation.html:28 +#: templates/ishtar/sheet_operation.html:34 msgid "Edition date:" msgstr "Date d'édition :" -#: templates/ishtar/sheet_operation.html:30 +#: templates/ishtar/sheet_operation.html:36 msgid "Begining date:" msgstr "Date de début :" -#: templates/ishtar/sheet_operation.html:31 +#: templates/ishtar/sheet_operation.html:37 msgid "Excavation end date:" msgstr "Date de fin de chantier :" -#: templates/ishtar/sheet_operation.html:33 +#: templates/ishtar/sheet_operation.html:39 msgid "Head scientist:" msgstr "Responsable scientifique :" -#: templates/ishtar/sheet_operation.html:34 +#: templates/ishtar/sheet_operation.html:40 msgid "State:" msgstr "État :" -#: templates/ishtar/sheet_operation.html:34 +#: templates/ishtar/sheet_operation.html:40 msgid "Active file" msgstr "Dossier archéologique actif" -#: templates/ishtar/sheet_operation.html:35 +#: templates/ishtar/sheet_operation.html:41 msgid "Closed operation" msgstr "Opération fermée" -#: templates/ishtar/sheet_operation.html:36 +#: templates/ishtar/sheet_operation.html:42 msgid "Closing date:" msgstr "Date de clotûre :" -#: templates/ishtar/sheet_operation.html:36 +#: templates/ishtar/sheet_operation.html:42 msgid "by" msgstr "par" -#: templates/ishtar/sheet_operation.html:38 +#: templates/ishtar/sheet_operation.html:44 msgid "Type:" msgstr "Type :" -#: templates/ishtar/sheet_operation.html:39 +#: templates/ishtar/sheet_operation.html:45 msgid "Surface:" msgstr "Surface :" -#: templates/ishtar/sheet_operation.html:40 +#: templates/ishtar/sheet_operation.html:46 msgid "Cost:" msgstr "Coût :" -#: templates/ishtar/sheet_operation.html:41 +#: templates/ishtar/sheet_operation.html:47 msgid "Duration:" msgstr "Durée :" -#: templates/ishtar/sheet_operation.html:41 +#: templates/ishtar/sheet_operation.html:47 msgid "Day" msgstr "Jour" -#: templates/ishtar/sheet_operation.html:43 +#: templates/ishtar/sheet_operation.html:49 msgid "Remains:" msgstr "Vestiges :" -#: templates/ishtar/sheet_operation.html:44 +#: templates/ishtar/sheet_operation.html:50 msgid "Periods:" msgstr "Périodes :" -#: templates/ishtar/sheet_operation.html:47 +#: templates/ishtar/sheet_operation.html:53 msgid "Associated file:" msgstr "Dossier archéologique associé :" -#: templates/ishtar/sheet_operation.html:50 +#: templates/ishtar/sheet_operation.html:56 msgid "Town planning service:" msgstr "Service instructeur :" -#: templates/ishtar/sheet_operation.html:51 +#: templates/ishtar/sheet_operation.html:57 msgid "Permit type:" msgstr "Type de permis :" -#: templates/ishtar/sheet_operation.html:52 +#: templates/ishtar/sheet_operation.html:58 msgid "Permit reference:" msgstr "Référence du permis :" -#: templates/ishtar/sheet_operation.html:53 +#: templates/ishtar/sheet_operation.html:59 msgid "General contractor organisation:" msgstr "Organisation de l'aménageur :" -#: templates/ishtar/sheet_operation.html:54 +#: templates/ishtar/sheet_operation.html:60 msgid "General contractor:" msgstr "Aménageur :" -#: templates/ishtar/sheet_operation.html:58 +#: templates/ishtar/sheet_operation.html:64 msgid "Comment:" msgstr "Commentaire :" -#: templates/ishtar/sheet_operation.html:60 +#: templates/ishtar/sheet_operation.html:66 msgid "Localisation" msgstr "Localisation" -#: templates/ishtar/sheet_operation.html:61 +#: templates/ishtar/sheet_operation.html:67 msgid "Towns:" msgstr "Communes :" -#: templates/ishtar/sheet_operation.html:63 +#: templates/ishtar/sheet_operation.html:69 msgid "Main address:" msgstr "Adresse des terrains :" -#: templates/ishtar/sheet_operation.html:64 +#: templates/ishtar/sheet_operation.html:70 msgid "Complement:" msgstr "Complément :" -#: templates/ishtar/sheet_operation.html:65 +#: templates/ishtar/sheet_operation.html:71 msgid "Postal code:" msgstr "Code postal :" -#: templates/ishtar/sheet_operation.html:73 +#: templates/ishtar/sheet_operation.html:79 msgid "Associated parcels" msgstr "Parcelles associées" -#: templates/ishtar/sheet_operation.html:75 +#: templates/ishtar/sheet_operation.html:81 msgid "Commune" msgstr "Commune" -#: templates/ishtar/sheet_operation.html:90 +#: templates/ishtar/sheet_operation.html:96 msgid "No parcel associated to this operation" msgstr "Pas de parcelle associée à cette opération" -#: templates/ishtar/sheet_operation.html:98 +#: templates/ishtar/sheet_operation.html:104 msgid "Ref." msgstr "Réf." -#: templates/ishtar/sheet_operation.html:99 -#: templates/ishtar/sheet_operation.html:119 -#: templates/ishtar/sheet_operation.html:139 +#: templates/ishtar/sheet_operation.html:105 +#: templates/ishtar/sheet_operation.html:127 #: templates/ishtar/dashboards/dashboard_operation.html:82 msgid "Type" msgstr "Type" -#: templates/ishtar/sheet_operation.html:100 +#: templates/ishtar/sheet_operation.html:106 msgid "Date" msgstr "Date" -#: templates/ishtar/sheet_operation.html:110 +#: templates/ishtar/sheet_operation.html:116 msgid "No acts associated to this operation" msgstr "Pas d'acte associé à cette opération" -#: templates/ishtar/sheet_operation.html:114 -msgid "Scientific documentation" -msgstr "Documentation scientifique" - -#: templates/ishtar/sheet_operation.html:116 -msgid "Documents" -msgstr "Documents" - -#: templates/ishtar/sheet_operation.html:118 -msgid "Title" -msgstr "Titre" - #: templates/ishtar/sheet_operation.html:120 -msgid "Authors" -msgstr "Auteurs" - -#: templates/ishtar/sheet_operation.html:121 -#: templates/ishtar/sheet_operation.html:128 -msgid "Link" -msgstr "Lien" - -#: templates/ishtar/sheet_operation.html:131 -msgid "No scientific document associated to this operation" -msgstr "Pas de document scientifique associé à cette opération" +msgid "Document from this operation" +msgstr "Documents de cette opération" -#: templates/ishtar/sheet_operation.html:136 +#: templates/ishtar/sheet_operation.html:124 msgid "Context records" msgstr "Unité d'Enregistrement" -#: templates/ishtar/sheet_operation.html:138 +#: templates/ishtar/sheet_operation.html:126 msgid "ID" msgstr "Identifiant" -#: templates/ishtar/sheet_operation.html:140 +#: templates/ishtar/sheet_operation.html:128 msgid "Chronology" msgstr "Chronologie" -#: templates/ishtar/sheet_operation.html:141 -#: templates/ishtar/sheet_operation.html:167 +#: templates/ishtar/sheet_operation.html:129 +#: templates/ishtar/sheet_operation.html:159 msgid "Description" msgstr "Description" -#: templates/ishtar/sheet_operation.html:152 -#: templates/ishtar/sheet_operation.html:191 +#: templates/ishtar/sheet_operation.html:140 +#: templates/ishtar/sheet_operation.html:183 msgid "Details" msgstr "Détails" -#: templates/ishtar/sheet_operation.html:155 +#: templates/ishtar/sheet_operation.html:143 msgid "No context record associated to this operation" msgstr "Pas d'Unité d'Enregistrement associée à cette opération" -#: templates/ishtar/sheet_operation.html:160 +#: templates/ishtar/sheet_operation.html:147 +msgid "Documents from associated context records" +msgstr "Documents d'Unité d'Enregistrement associés" + +#: templates/ishtar/sheet_operation.html:152 msgid "Finds" msgstr "Mobilier" -#: templates/ishtar/sheet_operation.html:162 +#: templates/ishtar/sheet_operation.html:154 msgid "Complete Id" msgstr "Id complet" -#: templates/ishtar/sheet_operation.html:163 +#: templates/ishtar/sheet_operation.html:155 msgid "Short Id" msgstr "Id court" -#: templates/ishtar/sheet_operation.html:164 +#: templates/ishtar/sheet_operation.html:156 msgid "Material type" msgstr "Type de matériau" -#: templates/ishtar/sheet_operation.html:165 +#: templates/ishtar/sheet_operation.html:157 msgctxt "short" msgid "Context record" msgstr "UE" -#: templates/ishtar/sheet_operation.html:168 +#: templates/ishtar/sheet_operation.html:160 msgid "Weight" msgstr "Poids" -#: templates/ishtar/sheet_operation.html:169 +#: templates/ishtar/sheet_operation.html:161 msgid "Numbers" msgstr "Nombre" -#: templates/ishtar/sheet_operation.html:171 +#: templates/ishtar/sheet_operation.html:163 msgid "Container ref." msgstr "Réf. du contenant" -#: templates/ishtar/sheet_operation.html:172 +#: templates/ishtar/sheet_operation.html:164 msgid "Warehouse" msgstr "Dépôt" -#: templates/ishtar/sheet_operation.html:195 +#: templates/ishtar/sheet_operation.html:187 msgid "No find associated to context record" msgstr "Pas de mobilier associé à cette Unité d'Enregistrement" -#: templates/ishtar/sheet_operation.html:198 +#: templates/ishtar/sheet_operation.html:190 msgid "No find associated to parcel" msgstr "Pas de mobilier associé à cette parcelle" -#: templates/ishtar/sheet_operation.html:198 +#: templates/ishtar/sheet_operation.html:190 msgid "(no context record)" msgstr "(pas d'Unité d'Enregistrement)" +#: templates/ishtar/sheet_operation.html:195 +msgid "Documents from associated finds" +msgstr "Documents concernant le mobilier associé" + #: templates/ishtar/dashboards/dashboard_operation.html:11 msgid "Global informations" msgstr "Informations générales" @@ -1097,6 +1107,24 @@ msgstr "Coût FNAP" msgid "Main towns by cost" msgstr "Principales communes par coût" +#~ msgid "Scientific documentation" +#~ msgstr "Documentation scientifique" + +#~ msgid "Documents" +#~ msgstr "Documents" + +#~ msgid "Title" +#~ msgstr "Titre" + +#~ msgid "Authors" +#~ msgstr "Auteurs" + +#~ msgid "Link" +#~ msgstr "Lien" + +#~ msgid "No scientific document associated to this operation" +#~ msgstr "Pas de document scientifique associé à cette opération" + #~ msgid "Reference" #~ msgstr "Référence" diff --git a/archaeological_operations/migrations/0012_auto.py b/archaeological_operations/migrations/0012_auto.py new file mode 100644 index 000000000..311f3f3d3 --- /dev/null +++ b/archaeological_operations/migrations/0012_auto.py @@ -0,0 +1,415 @@ +# -*- 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 associated_template on 'ActType' + db.create_table('archaeological_operations_acttype_associated_template', ( + ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), + ('acttype', models.ForeignKey(orm['archaeological_operations.acttype'], null=False)), + ('documenttemplate', models.ForeignKey(orm['ishtar_common.documenttemplate'], null=False)) + )) + db.create_unique('archaeological_operations_acttype_associated_template', ['acttype_id', 'documenttemplate_id']) + + + def backwards(self, orm): + # Removing M2M table for field associated_template on 'ActType' + db.delete_table('archaeological_operations_acttype_associated_template') + + + models = { + 'archaeological_files.file': { + 'Meta': {'ordering': "['-year', '-numeric_reference']", 'object_name': 'File'}, + 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'cached_label': ('django.db.models.fields.CharField', [], {'max_length': '500', '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'}), + 'end_date': ('django.db.models.fields.DateField', [], {'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': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'file_responsability'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'unique': 'True', 'null': 'True', 'blank': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), + 'numeric_reference': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'permit_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}), + 'permit_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.PermitType']", 'null': 'True', 'blank': 'True'}), + 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'reference_number': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'related_file': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.File']", 'null': 'True', 'blank': 'True'}), + 'saisine_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.SaisineType']", 'null': 'True', 'blank': 'True'}), + 'total_developed_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'total_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'town_planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), + 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'file'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), + 'year': ('django.db.models.fields.IntegerField', [], {'default': '2013'}) + }, + 'archaeological_files.filetype': { + 'Meta': {'ordering': "('label',)", 'object_name': 'FileType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + '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': '30'}) + }, + 'archaeological_files.permittype': { + 'Meta': {'ordering': "('label',)", 'object_name': 'PermitType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + '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': '30'}) + }, + 'archaeological_files.saisinetype': { + 'Meta': {'ordering': "('label',)", 'object_name': 'SaisineType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'delay': ('django.db.models.fields.IntegerField', [], {}), + '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': '30'}) + }, + 'archaeological_operations.acttype': { + 'Meta': {'ordering': "('label',)", 'object_name': 'ActType'}, + 'associated_template': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['ishtar_common.DocumentTemplate']", 'null': 'True', 'blank': 'True'}), + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'intented_to': ('django.db.models.fields.CharField', [], {'max_length': '1'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'archaeological_operations.administrativeact': { + 'Meta': {'object_name': 'AdministrativeAct'}, + 'act_object': ('django.db.models.fields.CharField', [], {'max_length': '200'}), + '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']"}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + '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', [], {'to': "orm['ishtar_common.Organization']", 'null': 'True', 'blank': 'True'}), + 'ref_sra': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), + 'scientific': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'signatory': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'signature_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_operations.historicaladministrativeact': { + 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalAdministrativeAct'}, + 'act_object': ('django.db.models.fields.CharField', [], {'max_length': '200'}), + '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'}), + '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'}), + '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'}), + 'scientific_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'}) + }, + 'archaeological_operations.historicaloperation': { + 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalOperation'}, + 'associated_file_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'cached_label': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), + 'cira_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'cira_rapporteur_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'code_dracar': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'code_patriarche': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'common_name': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), + 'cost': ('django.db.models.fields.IntegerField', [], {'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'}), + '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_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'history_modifier_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), + 'history_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), + 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), + 'in_charge_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + 'negative_result': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + 'operation_code': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'operation_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'operator_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'}), + 'report_delivery_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'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'}), + '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': {'object_name': 'Operation'}, + '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': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'code_dracar': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'code_patriarche': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'common_name': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), + 'cost': ('django.db.models.fields.IntegerField', [], {'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'}), + '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_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operation_responsability'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + 'negative_result': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + 'operation_code': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'operation_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['archaeological_operations.OperationType']"}), + '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', [], {'to': "orm['archaeological_operations.Period']", 'symmetrical': 'False'}), + 'remains': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_operations.RemainType']", 'symmetrical': 'False'}), + 'report_delivery_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'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'}), + 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.Town']", 'symmetrical': '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'}, + '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']"}), + 'creation_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'index': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '25', 'null': 'True', 'blank': 'True'}), + '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'}), + 'reference': ('django.db.models.fields.CharField', [], {'max_length': '25', 'null': 'True', 'blank': 'True'}), + 'source_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SourceType']"}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}) + }, + 'archaeological_operations.operationtype': { + 'Meta': {'ordering': "['label']", 'object_name': 'OperationType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + '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'}), + 'preventive': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'archaeological_operations.parcel': { + 'Meta': {'object_name': 'Parcel'}, + 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), + 'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + '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'}), + 'section': ('django.db.models.fields.CharField', [], {'max_length': '4'}), + 'town': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'parcels'", 'to': "orm['ishtar_common.Town']"}), + 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_operations.parcelowner': { + 'Meta': {'object_name': 'ParcelOwner'}, + 'end_date': ('django.db.models.fields.DateField', [], {}), + 'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Person']"}), + 'parcel': ('django.db.models.fields.related.ForeignKey', [], {'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': 'False'}), + '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': '30'}) + }, + 'archaeological_operations.remaintype': { + 'Meta': {'ordering': "('label',)", 'object_name': 'RemainType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + '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': '30'}) + }, + 'auth.group': { + 'Meta': {'object_name': 'Group'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + 'auth.permission': { + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + 'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'ishtar_common.arrondissement': { + 'Meta': {'object_name': 'Arrondissement'}, + 'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}) + }, + 'ishtar_common.author': { + 'Meta': {'object_name': 'Author'}, + 'author_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.AuthorType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'person': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'author'", 'to': "orm['ishtar_common.Person']"}) + }, + 'ishtar_common.authortype': { + 'Meta': {'object_name': 'AuthorType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + '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': '30'}) + }, + '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'}) + }, + 'ishtar_common.documenttemplate': { + 'Meta': {'ordering': "['associated_object_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.organization': { + 'Meta': {'object_name': 'Organization'}, + 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'organization_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.OrganizationType']"}), + 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), + 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'town': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}) + }, + 'ishtar_common.organizationtype': { + 'Meta': {'ordering': "('label',)", 'object_name': 'OrganizationType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + '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': '30'}) + }, + 'ishtar_common.person': { + 'Meta': {'object_name': 'Person'}, + 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'attached_to': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Organization']", 'null': 'True', 'blank': 'True'}), + 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), + 'email': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}), + 'person_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.PersonType']", 'symmetrical': 'False'}), + 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), + 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'surname': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '2'}), + 'town': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}) + }, + 'ishtar_common.persontype': { + 'Meta': {'ordering': "('label',)", 'object_name': 'PersonType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'ishtar_common.sourcetype': { + 'Meta': {'object_name': 'SourceType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + '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': '30'}) + }, + 'ishtar_common.town': { + 'Meta': {'ordering': "['numero_insee']", 'object_name': 'Town'}, + 'canton': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Canton']", 'null': 'True', 'blank': 'True'}), + 'center': ('django.contrib.gis.db.models.fields.PointField', [], {'srid': '27572', 'null': 'True', 'blank': 'True'}), + 'departement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'numero_insee': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '6'}), + 'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) + } + } + + complete_apps = ['archaeological_operations']
\ No newline at end of file diff --git a/archaeological_operations/migrations/0013_auto__add_field_acttype_code.py b/archaeological_operations/migrations/0013_auto__add_field_acttype_code.py new file mode 100644 index 000000000..273c8cd24 --- /dev/null +++ b/archaeological_operations/migrations/0013_auto__add_field_acttype_code.py @@ -0,0 +1,413 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Adding field 'ActType.code' + db.add_column('archaeological_operations_acttype', 'code', + self.gf('django.db.models.fields.CharField')(max_length=10, null=True, blank=True), + keep_default=False) + + + def backwards(self, orm): + # Deleting field 'ActType.code' + db.delete_column('archaeological_operations_acttype', 'code') + + + models = { + 'archaeological_files.file': { + 'Meta': {'ordering': "['-year', '-numeric_reference']", 'object_name': 'File'}, + 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'cached_label': ('django.db.models.fields.CharField', [], {'max_length': '500', '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'}), + 'end_date': ('django.db.models.fields.DateField', [], {'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': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'file_responsability'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'unique': 'True', 'null': 'True', 'blank': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), + 'numeric_reference': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'permit_reference': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}), + 'permit_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.PermitType']", 'null': 'True', 'blank': 'True'}), + 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'reception_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'reference_number': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'related_file': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.File']", 'null': 'True', 'blank': 'True'}), + 'saisine_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['archaeological_files.SaisineType']", 'null': 'True', 'blank': 'True'}), + 'total_developed_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'total_surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'town_planning_service': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}), + 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'file'", 'symmetrical': 'False', 'to': "orm['ishtar_common.Town']"}), + 'year': ('django.db.models.fields.IntegerField', [], {'default': '2013'}) + }, + 'archaeological_files.filetype': { + 'Meta': {'ordering': "('label',)", 'object_name': 'FileType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + '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': '30'}) + }, + 'archaeological_files.permittype': { + 'Meta': {'ordering': "('label',)", 'object_name': 'PermitType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + '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': '30'}) + }, + 'archaeological_files.saisinetype': { + 'Meta': {'ordering': "('label',)", 'object_name': 'SaisineType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'delay': ('django.db.models.fields.IntegerField', [], {}), + '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': '30'}) + }, + 'archaeological_operations.acttype': { + 'Meta': {'ordering': "('label',)", 'object_name': 'ActType'}, + 'associated_template': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['ishtar_common.DocumentTemplate']", 'null': 'True', 'blank': 'True'}), + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + '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'}), + 'intented_to': ('django.db.models.fields.CharField', [], {'max_length': '1'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'archaeological_operations.administrativeact': { + 'Meta': {'object_name': 'AdministrativeAct'}, + 'act_object': ('django.db.models.fields.CharField', [], {'max_length': '200'}), + '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']"}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + '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', [], {'to': "orm['ishtar_common.Organization']", 'null': 'True', 'blank': 'True'}), + 'ref_sra': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), + 'scientific': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'signatory': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'signature_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_operations.historicaladministrativeact': { + 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalAdministrativeAct'}, + 'act_object': ('django.db.models.fields.CharField', [], {'max_length': '200'}), + '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'}), + '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'}), + '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'}), + 'scientific_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'}) + }, + 'archaeological_operations.historicaloperation': { + 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalOperation'}, + 'associated_file_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'cached_label': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), + 'cira_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'cira_rapporteur_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'code_dracar': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'code_patriarche': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'common_name': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), + 'cost': ('django.db.models.fields.IntegerField', [], {'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'}), + '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_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'history_modifier_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}), + 'history_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), + 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}), + 'in_charge_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + 'negative_result': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + 'operation_code': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'operation_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'operator_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'}), + 'report_delivery_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'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'}), + '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': {'object_name': 'Operation'}, + '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': "'+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'code_dracar': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'code_patriarche': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'common_name': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}), + 'cost': ('django.db.models.fields.IntegerField', [], {'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'}), + '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_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'in_charge': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'operation_responsability'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}), + 'large_area_prescription': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + 'negative_result': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), + 'operation_code': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'operation_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['archaeological_operations.OperationType']"}), + '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', [], {'to': "orm['archaeological_operations.Period']", 'symmetrical': 'False'}), + 'remains': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['archaeological_operations.RemainType']", 'symmetrical': 'False'}), + 'report_delivery_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'scheduled_man_days': ('django.db.models.fields.IntegerField', [], {'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'}), + 'towns': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.Town']", 'symmetrical': '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'}, + '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']"}), + 'creation_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'index': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'internal_reference': ('django.db.models.fields.CharField', [], {'max_length': '25', 'null': 'True', 'blank': 'True'}), + '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'}), + 'reference': ('django.db.models.fields.CharField', [], {'max_length': '25', 'null': 'True', 'blank': 'True'}), + 'source_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.SourceType']"}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}) + }, + 'archaeological_operations.operationtype': { + 'Meta': {'ordering': "['label']", 'object_name': 'OperationType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + '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'}), + 'preventive': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'archaeological_operations.parcel': { + 'Meta': {'object_name': 'Parcel'}, + 'associated_file': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'parcels'", 'null': 'True', 'to': "orm['archaeological_files.File']"}), + 'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + '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'}), + 'section': ('django.db.models.fields.CharField', [], {'max_length': '4'}), + 'town': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'parcels'", 'to': "orm['ishtar_common.Town']"}), + 'year': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) + }, + 'archaeological_operations.parcelowner': { + 'Meta': {'object_name': 'ParcelOwner'}, + 'end_date': ('django.db.models.fields.DateField', [], {}), + 'history_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Person']"}), + 'parcel': ('django.db.models.fields.related.ForeignKey', [], {'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': 'False'}), + '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': '30'}) + }, + 'archaeological_operations.remaintype': { + 'Meta': {'ordering': "('label',)", 'object_name': 'RemainType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + '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': '30'}) + }, + 'auth.group': { + 'Meta': {'object_name': 'Group'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + 'auth.permission': { + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + 'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'ishtar_common.arrondissement': { + 'Meta': {'object_name': 'Arrondissement'}, + 'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}) + }, + 'ishtar_common.author': { + 'Meta': {'object_name': 'Author'}, + 'author_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.AuthorType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'person': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'author'", 'to': "orm['ishtar_common.Person']"}) + }, + 'ishtar_common.authortype': { + 'Meta': {'object_name': 'AuthorType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + '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': '30'}) + }, + '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'}) + }, + 'ishtar_common.documenttemplate': { + 'Meta': {'ordering': "['associated_object_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.organization': { + 'Meta': {'object_name': 'Organization'}, + 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'organization_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.OrganizationType']"}), + 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), + 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'town': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}) + }, + 'ishtar_common.organizationtype': { + 'Meta': {'ordering': "('label',)", 'object_name': 'OrganizationType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + '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': '30'}) + }, + 'ishtar_common.person': { + 'Meta': {'object_name': 'Person'}, + 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'attached_to': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Organization']", 'null': 'True', 'blank': 'True'}), + 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}), + 'email': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}), + 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}), + 'person_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.PersonType']", 'symmetrical': 'False'}), + 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}), + 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}), + 'surname': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '2'}), + 'town': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}) + }, + 'ishtar_common.persontype': { + 'Meta': {'ordering': "('label',)", 'object_name': 'PersonType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'ishtar_common.sourcetype': { + 'Meta': {'object_name': 'SourceType'}, + 'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + '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': '30'}) + }, + 'ishtar_common.town': { + 'Meta': {'ordering': "['numero_insee']", 'object_name': 'Town'}, + 'canton': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Canton']", 'null': 'True', 'blank': 'True'}), + 'center': ('django.contrib.gis.db.models.fields.PointField', [], {'srid': '27572', 'null': 'True', 'blank': 'True'}), + 'departement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'numero_insee': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '6'}), + 'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) + } + } + + complete_apps = ['archaeological_operations']
\ No newline at end of file diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index e4e56843f..125a5d7d1 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -31,7 +31,8 @@ from ishtar_common.utils import cached_label_changed from ishtar_common.models import GeneralType, BaseHistorizedItem, \ HistoricalRecords, LightHistorizedItem, OwnPerms, Department, Source,\ - Person, Organization, Town, Dashboard, IshtarUser, ValueGetter + Person, Organization, Town, Dashboard, IshtarUser, ValueGetter, \ + DocumentTemplate FILES_AVAILABLE = 'archaeological_files' in settings.INSTALLED_APPS if FILES_AVAILABLE: from archaeological_files.models import File @@ -352,6 +353,9 @@ class ActType(GeneralType): ) intented_to = models.CharField(_(u"Intended to"), max_length=1, choices=TYPE) + code = models.CharField(_(u"Code"), max_length=10, blank=True, null=True) + associated_template = models.ManyToManyField(DocumentTemplate, blank=True, + null=True, verbose_name=_(u"Associated template")) class Meta: verbose_name = _(u"Act type") verbose_name_plural = _(u"Act types") @@ -408,6 +412,26 @@ class AdministrativeAct(BaseHistorizedItem, OwnPerms, ValueGetter): for item in [self.operation, self.associated_file, self.act_object] if item]) + def get_filename(self, operation=False): + filename = '' + if operation and self.operation: + filename = self.operation.associated_filename + elif self.associated_file: + filename = self.associated_file.associated_filename + filename = u"-".join(filename.split('-')[:-1]) # remove date + if self.act_type.code: + filename += u"-" + self.act_type.code + if self.signature_date: + filename += u"-" + self.signature_date.strftime('%Y%m%d') + return filename + + def publish(self): + if not self.act_type.associated_template.count(): + return + # for administrative_act only one associated_template + template = self.act_type.associated_template.all()[0] + return template.publish(self) + class Parcel(LightHistorizedItem): if FILES_AVAILABLE: associated_file = models.ForeignKey(File, related_name='parcels', diff --git a/archaeological_operations/urls.py b/archaeological_operations/urls.py index 13a2c5c35..4453b10ed 100644 --- a/archaeological_operations/urls.py +++ b/archaeological_operations/urls.py @@ -71,6 +71,9 @@ urlpatterns += patterns('archaeological_operations.views', 'show_operation', name='show-historized-operation'), url(r'get-administrativeactop/(?P<type>.+)?$', 'get_administrativeactop', name='get-administrativeactop'), + url(r'generatedoc-administrativeactop/(?P<pk>.+)?$', + 'generatedoc_administrativeactop', + name='generatedoc-administrativeactop'), url(r'get-operationsource/(?P<type>.+)?$', 'get_operationsource', name='get-operationsource'), url(r'dashboard_operation/$', 'dashboard_operation', diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py index 97446b635..c899b1c4d 100644 --- a/archaeological_operations/views.py +++ b/archaeological_operations/views.py @@ -18,10 +18,12 @@ # See the file COPYING for details. import json +import os from django.db.models import Q from django.http import HttpResponse from django.shortcuts import render_to_response +from django.template.defaultfilters import slugify from django.utils.translation import ugettext_lazy as _ from ishtar_common.views import get_item, show_item, revert_item @@ -258,3 +260,27 @@ operation_administrativeactop_deletion_wizard = \ label=_(u"Operation: administrative act deletion"), url_name='operation_administrativeactop_deletion',) +def generatedoc_administrativeactop(request, pk): + if (not request.user.has_perm('ishtar_common.view_operation', + models.Operation) + and not request.user.has_perm('ishtar_common.view_own_operation', + models.Operation)): + return HttpResponse(mimetype='text/plain') + try: + act_file = models.AdministrativeAct.objects.get(pk=pk) + doc = act_file.publish() + except models.AdministrativeAct.DoesNotExist: + doc = None + if doc: + MIMES = {'odt':'application/vnd.oasis.opendocument.text', + 'ods':'application/vnd.oasis.opendocument.spreadsheet'} + ext = doc.split('.')[-1] + doc_name = act_file.get_filename() + "." + ext + mimetype = 'text/csv' + if ext in MIMES: + mimetype = MIMES[ext] + response = HttpResponse(open(doc), mimetype=mimetype) + response['Content-Disposition'] = 'attachment; filename=%s' % \ + doc_name + return response + return HttpResponse(mimetype='text/plain') diff --git a/archaeological_operations/wizards.py b/archaeological_operations/wizards.py index 07c8844b9..86af26351 100644 --- a/archaeological_operations/wizards.py +++ b/archaeological_operations/wizards.py @@ -19,6 +19,7 @@ from django.conf import settings from django.core.exceptions import ObjectDoesNotExist +from django.core.urlresolvers import reverse from django.db.models import Max from django.shortcuts import render_to_response from django.template import RequestContext @@ -27,7 +28,7 @@ from django.utils.translation import ugettext_lazy as _ from ishtar_common.wizards import Wizard, ClosingWizard, DeletionWizard, \ SourceWizard import models -from forms import ParcelForm +from forms import ParcelForm, GenerateDocForm class OperationWizard(Wizard): model = models.Operation @@ -267,18 +268,27 @@ class OperationAdministrativeActWizard(OperationWizard): dct['history_modifier'] = self.request.user return dct + def get_context_data(self, form, **kwargs): + # manage document generation + context = super(OperationAdministrativeActWizard, self + ).get_context_data(form, **kwargs) + step = self.steps.current + if step.startswith('final-'): + general_form_key = 'administrativeact-' + self.url_name + try: + act_type = models.ActType.objects.get( + pk=self.session_get_value(general_form_key, "act_type")) + except models.ActType.DoesNotExist: + pass + if act_type and act_type.associated_template.count(): + context['extra_form'] = GenerateDocForm() + return context + def get_associated_item(self, dct): return self.get_current_object() def save_model(self, dct, m2m, whole_associated_models, form_list, return_object): - associated_item = self.get_associated_item(dct) - if not associated_item: - return self.render(form_list[-1]) - if isinstance(associated_item, models.File): - dct['associated_file'] = associated_item - elif isinstance(associated_item, models.Operation): - dct['operation'] = associated_item dct['history_modifier'] = self.request.user if 'pk' in dct: dct.pop('pk') @@ -288,10 +298,35 @@ class OperationAdministrativeActWizard(OperationWizard): if hasattr(admact, k): setattr(admact, k, dct[k]) else: + associated_item = self.get_associated_item(dct) + if not associated_item: + return self.render(form_list[-1]) + if isinstance(associated_item, models.File): + dct['associated_file'] = associated_item + elif isinstance(associated_item, models.Operation): + dct['operation'] = associated_item admact = models.AdministrativeAct(**dct) admact.save() - res = render_to_response('ishtar/wizard/wizard_done.html', {}, - context_instance=RequestContext(self.request)) + dct['item'] = admact + + # check if a doc generation is required + keys = [self.storage.prefix, 'step_data', 'final-' + self.url_name, + 'doc_generation'] + level = 0 + r = self.request.session + for k in keys: + if k in r and r[k]: + level += 1 + r = r[k] + else: + break + if level == len(keys): # the whole tree as been traversed + # redirect to the generated doc + dct['redirect'] = reverse('generatedoc-administrativeactop', + args=[admact.pk]) + + res = render_to_response('ishtar/wizard/wizard_done.html', dct, + context_instance=RequestContext(self.request)) return res class OperationEditAdministrativeActWizard(OperationAdministrativeActWizard): |