summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/forms_common.py41
-rw-r--r--ishtar_common/locale/django.pot500
-rw-r--r--ishtar_common/menu_base.py3
-rw-r--r--ishtar_common/menus.py8
-rw-r--r--ishtar_common/migrations/0049_auto__add_field_person_alt_address__add_field_person_alt_address_compl.py699
-rw-r--r--ishtar_common/migrations/0050_auto__chg_field_person_phone_desc3__chg_field_person_phone_desc2__chg_.py479
-rw-r--r--ishtar_common/models.py65
-rw-r--r--ishtar_common/static/media/style.css34
-rw-r--r--ishtar_common/templates/blocks/table_field.html4
-rw-r--r--ishtar_common/templates/ishtar/blocks/modify_toolbar.html1
-rw-r--r--ishtar_common/templates/ishtar/sheet.html1
-rw-r--r--ishtar_common/templates/ishtar/sheet_person.html49
-rw-r--r--ishtar_common/templates/ishtar/sheet_toolbar.html2
-rw-r--r--ishtar_common/templates/ishtar/wizard/default_wizard.html2
-rw-r--r--ishtar_common/templates/ishtar/wizard/wizard_person.html59
-rw-r--r--ishtar_common/templatetags/link_to_window.py22
-rw-r--r--ishtar_common/templatetags/table_form.py8
-rw-r--r--ishtar_common/urls.py2
-rw-r--r--ishtar_common/views.py9
-rw-r--r--ishtar_common/wizards.py4
20 files changed, 1752 insertions, 240 deletions
diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py
index ae72d173f..1d8dc2092 100644
--- a/ishtar_common/forms_common.py
+++ b/ishtar_common/forms_common.py
@@ -260,18 +260,19 @@ class SimplePersonForm(NewItemForm):
validators=[name_validator])
raw_name = forms.CharField(label=_(u"Raw name"), max_length=300,
required=False)
- address = forms.CharField(label=_(u"Address"), widget=forms.Textarea,
- required=False)
- address_complement = forms.CharField(label=_(u"Address complement"),
- widget=forms.Textarea, required=False)
- postal_code = forms.CharField(label=_(u"Postal code"), max_length=10,
- required=False)
- town = forms.CharField(label=_(u"Town"), max_length=30, required=False)
- country = forms.CharField(label=_(u"Country"), max_length=30,
- required=False)
email = forms.EmailField(label=_(u"Email"), required=False)
+ phone_desc = forms.CharField(label=_(u"Phone description"), max_length=300,
+ required=False)
phone = forms.CharField(label=_(u"Phone"), max_length=18, required=False)
- mobile_phone = forms.CharField(label=_(u"Town"), max_length=18,
+ phone_desc2 = forms.CharField(label=_(u"Phone description 2"),
+ max_length=300, required=False)
+ phone2 = forms.CharField(label=_(u"Phone 2"), max_length=18,
+ required=False)
+ phone_desc3 = forms.CharField(label=_(u"Phone description 3"),
+ max_length=300, required=False)
+ phone3 = forms.CharField(label=_(u"Phone 3"), max_length=18,
+ required=False)
+ mobile_phone = forms.CharField(label=_(u"Mobile phone"), max_length=18,
required=False)
attached_to = forms.IntegerField(
label=_("Current organization"),
@@ -279,6 +280,26 @@ class SimplePersonForm(NewItemForm):
reverse_lazy('autocomplete-organization'),
associated_model=models.Organization, new=True),
validators=[models.valid_id(models.Organization)], required=False)
+ address = forms.CharField(label=_(u"Address"), widget=forms.Textarea,
+ required=False)
+ address_complement = forms.CharField(
+ label=_(u"Address complement"), widget=forms.Textarea, required=False)
+ postal_code = forms.CharField(label=_(u"Postal code"), max_length=10,
+ required=False)
+ town = forms.CharField(label=_(u"Town"), max_length=30, required=False)
+ country = forms.CharField(label=_(u"Country"), max_length=30,
+ required=False)
+ alt_address = forms.CharField(label=_(u"Other address: address"),
+ widget=forms.Textarea, required=False)
+ alt_address_complement = forms.CharField(
+ label=_(u"Other address: address complement"),
+ widget=forms.Textarea, required=False)
+ alt_postal_code = forms.CharField(label=_(u"Other address: postal code"),
+ max_length=10, required=False)
+ alt_town = forms.CharField(label=_(u"Other address: town"), max_length=30,
+ required=False)
+ alt_country = forms.CharField(label=_(u"Other address: country"),
+ max_length=30, required=False)
def __init__(self, *args, **kwargs):
super(SimplePersonForm, self).__init__(*args, **kwargs)
diff --git a/ishtar_common/locale/django.pot b/ishtar_common/locale/django.pot
index 0610c5e95..303c03ace 100644
--- a/ishtar_common/locale/django.pot
+++ b/ishtar_common/locale/django.pot
@@ -24,7 +24,7 @@ msgstr ""
msgid "Archaeological file"
msgstr ""
-#: context_processors.py:38 models.py:1251
+#: context_processors.py:38 models.py:1281
msgid "Operation"
msgstr ""
@@ -147,7 +147,7 @@ msgstr ""
msgid "Enter a valid name consisting of letters, spaces and hyphens."
msgstr ""
-#: forms.py:71 forms_common.py:420
+#: forms.py:71 forms_common.py:441
msgid "Confirm"
msgstr ""
@@ -176,7 +176,7 @@ msgid "Template"
msgstr ""
#: forms_common.py:39 forms_common.py:57 forms_common.py:169
-#: forms_common.py:269 forms_common.py:274 models.py:1124 models.py:2340
+#: forms_common.py:289 models.py:1124 models.py:2377
#: templates/blocks/JQueryAdvancedTown.html:19
#: templates/ishtar/sheet_organization.html:17
msgid "Town"
@@ -192,67 +192,72 @@ msgid ""
"french town Saint-Denis in the Seine-Saint-Denis department.</p>"
msgstr ""
-#: forms_common.py:66 forms_common.py:648 ishtar_menu.py:42 models.py:2039
-#: models.py:2168 models.py:2222 templates/ishtar/sheet_person.html:6
+#: forms_common.py:66 forms_common.py:669 ishtar_menu.py:42 models.py:1279
+#: models.py:2076 models.py:2205 models.py:2259
+#: templates/ishtar/sheet_person.html:6
msgid "Person"
msgstr ""
-#: forms_common.py:157 forms_common.py:231 ishtar_menu.py:66 models.py:1961
-#: templates/ishtar/sheet_organization.html:6
+#: forms_common.py:157 forms_common.py:231 ishtar_menu.py:66 models.py:1280
+#: models.py:1995 templates/ishtar/sheet_organization.html:6
msgid "Organization"
msgstr ""
#: forms_common.py:160 forms_common.py:196 forms_common.py:226
-#: forms_common.py:259 models.py:775 models.py:1057 models.py:1293
-#: models.py:1511 models.py:1955 models.py:2029 models.py:2326
+#: forms_common.py:259 models.py:775 models.py:1057 models.py:1325
+#: models.py:1543 models.py:1989 models.py:2063 models.py:2363
#: templates/ishtar/sheet_organization.html:12
#: templates/ishtar/sheet_organization.html:25
msgid "Name"
msgstr ""
-#: forms_common.py:161 models.py:1238 models.py:1642
+#: forms_common.py:161 models.py:1266 models.py:1674
msgid "Organization type"
msgstr ""
-#: forms_common.py:163 forms_common.py:263 models.py:1119
+#: forms_common.py:163 forms_common.py:283 models.py:1119
#: templates/ishtar/sheet_organization.html:14
msgid "Address"
msgstr ""
-#: forms_common.py:165 forms_common.py:265 models.py:1120
+#: forms_common.py:165 forms_common.py:286 models.py:1120
#: templates/ishtar/sheet_organization.html:15
msgid "Address complement"
msgstr ""
-#: forms_common.py:167 forms_common.py:267 models.py:1122
+#: forms_common.py:167 forms_common.py:287 models.py:1122
#: templates/ishtar/sheet_organization.html:16
msgid "Postal code"
msgstr ""
-#: forms_common.py:170 forms_common.py:270 models.py:1125
+#: forms_common.py:170 forms_common.py:290 models.py:1125
msgid "Country"
msgstr ""
-#: forms_common.py:172 forms_common.py:228 forms_common.py:272
-#: forms_common.py:376 models.py:1131
+#: forms_common.py:172 forms_common.py:228 forms_common.py:263
+#: forms_common.py:397 models.py:1152
msgid "Email"
msgstr ""
-#: forms_common.py:173 forms_common.py:273 models.py:1127
+#: forms_common.py:173 forms_common.py:266 models.py:1137
#: templates/ishtar/sheet_organization.html:18
+#: templates/ishtar/sheet_person.html:23
+#: templates/ishtar/wizard/wizard_person.html:17
msgid "Phone"
msgstr ""
-#: forms_common.py:174 models.py:1128
+#: forms_common.py:174 forms_common.py:275 models.py:1149
#: templates/ishtar/sheet_organization.html:19
+#: templates/ishtar/sheet_person.html:41
+#: templates/ishtar/wizard/wizard_person.html:35
msgid "Mobile phone"
msgstr ""
-#: forms_common.py:197 forms_common.py:229 models.py:1666 models.py:1957
-#: models.py:2263 templates/sheet_ope.html:85 templates/sheet_ope.html.py:105
+#: forms_common.py:197 forms_common.py:229 models.py:1700 models.py:1991
+#: models.py:2300 templates/sheet_ope.html:85 templates/sheet_ope.html.py:105
#: templates/sheet_ope.html:126 templates/ishtar/import_list.html:13
#: templates/ishtar/sheet_organization.html:27
-#: templates/ishtar/sheet_person.html:56
+#: templates/ishtar/sheet_person.html:95
#: templates/ishtar/blocks/window_tables/documents.html:6
msgid "Type"
msgstr ""
@@ -261,7 +266,7 @@ msgstr ""
msgid "Organization search"
msgstr ""
-#: forms_common.py:227 forms_common.py:257 models.py:2027
+#: forms_common.py:227 forms_common.py:257 models.py:2061
#: templates/ishtar/sheet_organization.html:26
msgid "Surname"
msgstr ""
@@ -270,145 +275,186 @@ msgstr ""
msgid "Person search"
msgstr ""
-#: forms_common.py:254
+#: forms_common.py:254 templates/ishtar/sheet_person.html:12
+#: templates/ishtar/wizard/wizard_person.html:6
msgid "Identity"
msgstr ""
-#: forms_common.py:256 forms_common.py:574 forms_common.py:615 models.py:2025
-#: models.py:2260 templates/sheet_ope.html:104
-#: templates/ishtar/sheet_person.html:55
+#: forms_common.py:256 forms_common.py:595 forms_common.py:636 models.py:2059
+#: models.py:2297 templates/sheet_ope.html:104
+#: templates/ishtar/sheet_person.html:94
#: templates/ishtar/blocks/window_tables/documents.html:5
msgid "Title"
msgstr ""
-#: forms_common.py:261 models.py:2031
+#: forms_common.py:261 models.py:2065
msgid "Raw name"
msgstr ""
-#: forms_common.py:277
+#: forms_common.py:264 models.py:1138
+msgid "Phone description"
+msgstr ""
+
+#: forms_common.py:267 models.py:1140 models.py:1142
+msgid "Phone description 2"
+msgstr ""
+
+#: forms_common.py:269
+msgid "Phone 2"
+msgstr ""
+
+#: forms_common.py:271 models.py:1146
+msgid "Phone description 3"
+msgstr ""
+
+#: forms_common.py:273 models.py:1144
+msgid "Phone 3"
+msgstr ""
+
+#: forms_common.py:278
msgid "Current organization"
msgstr ""
-#: forms_common.py:325 forms_common.py:355 forms_common.py:359 models.py:2009
+#: forms_common.py:292 models.py:1127
+msgid "Other address: address"
+msgstr ""
+
+#: forms_common.py:295 models.py:1130
+msgid "Other address: address complement"
+msgstr ""
+
+#: forms_common.py:297 models.py:1131
+msgid "Other address: postal code"
+msgstr ""
+
+#: forms_common.py:299 models.py:1133
+msgid "Other address: town"
+msgstr ""
+
+#: forms_common.py:301 models.py:1135
+msgid "Other address: country"
+msgstr ""
+
+#: forms_common.py:346 forms_common.py:376 forms_common.py:380 models.py:2043
msgid "Person type"
msgstr ""
-#: forms_common.py:370 forms_common.py:375
+#: forms_common.py:391 forms_common.py:396
msgid "Account"
msgstr ""
-#: forms_common.py:379 wizards.py:1154
+#: forms_common.py:400 wizards.py:1158
msgid "New password"
msgstr ""
-#: forms_common.py:382
+#: forms_common.py:403
msgid "New password (confirmation)"
msgstr ""
-#: forms_common.py:401
+#: forms_common.py:422
msgid "Your password and confirmation password do not match."
msgstr ""
-#: forms_common.py:406
+#: forms_common.py:427
msgid "You must provide a correct password."
msgstr ""
-#: forms_common.py:414
+#: forms_common.py:435
msgid "This username already exists."
msgstr ""
-#: forms_common.py:421
+#: forms_common.py:442
msgid "Send the new password by email?"
msgstr ""
-#: forms_common.py:430 forms_common.py:443 models.py:2341
+#: forms_common.py:451 forms_common.py:464 models.py:2378
msgid "Towns"
msgstr ""
-#: forms_common.py:440
+#: forms_common.py:461
msgid "There are identical towns."
msgstr ""
-#: forms_common.py:524
+#: forms_common.py:545
msgid "Only one choice can be checked."
msgstr ""
-#: forms_common.py:572
+#: forms_common.py:593
msgid "Documentation informations"
msgstr ""
-#: forms_common.py:576 forms_common.py:616 models.py:1643 models.py:2243
+#: forms_common.py:597 forms_common.py:637 models.py:1675 models.py:2280
msgid "Source type"
msgstr ""
-#: forms_common.py:578 forms_common.py:617 templates/sheet_ope.html:84
+#: forms_common.py:599 forms_common.py:638 templates/sheet_ope.html:84
msgid "Reference"
msgstr ""
-#: forms_common.py:581 forms_common.py:618
+#: forms_common.py:602 forms_common.py:639
msgid "Internal reference"
msgstr ""
-#: forms_common.py:584 models.py:2274
+#: forms_common.py:605 models.py:2311
msgid "Numerical ressource (web address)"
msgstr ""
-#: forms_common.py:585 models.py:2276
+#: forms_common.py:606 models.py:2313
msgid "Receipt date"
msgstr ""
-#: forms_common.py:587 models.py:1793 models.py:2278
+#: forms_common.py:608 models.py:1827 models.py:2315
msgid "Creation date"
msgstr ""
-#: forms_common.py:590 models.py:2281
+#: forms_common.py:611 models.py:2318
msgid "Receipt date in documentation"
msgstr ""
-#: forms_common.py:592 forms_common.py:620 models.py:277 models.py:1538
-#: models.py:2288
+#: forms_common.py:613 forms_common.py:641 models.py:277 models.py:1570
+#: models.py:2069 models.py:2325
msgid "Comment"
msgstr ""
-#: forms_common.py:594 forms_common.py:619 models.py:777 models.py:1297
-#: models.py:1470 models.py:1512 models.py:2287 templates/sheet_ope.html:128
+#: forms_common.py:615 forms_common.py:640 models.py:777 models.py:1329
+#: models.py:1502 models.py:1544 models.py:2324 templates/sheet_ope.html:128
msgid "Description"
msgstr ""
-#: forms_common.py:597 models.py:2289
+#: forms_common.py:618 models.py:2326
msgid "Additional information"
msgstr ""
-#: forms_common.py:599 forms_common.py:623 models.py:2291
+#: forms_common.py:620 forms_common.py:644 models.py:2328
msgid "Has a duplicate"
msgstr ""
-#: forms_common.py:612 forms_common.py:641 forms_common.py:674 models.py:2227
+#: forms_common.py:633 forms_common.py:662 forms_common.py:695 models.py:2264
#: templates/ishtar/wizard/wizard_person_deletion.html:124
msgid "Author"
msgstr ""
-#: forms_common.py:622
+#: forms_common.py:643
msgid "Additional informations"
msgstr ""
-#: forms_common.py:633
+#: forms_common.py:654
msgid "Would you like to delete this documentation?"
msgstr ""
-#: forms_common.py:649 models.py:1644 models.py:2217 models.py:2224
+#: forms_common.py:670 models.py:1676 models.py:2254 models.py:2261
msgid "Author type"
msgstr ""
-#: forms_common.py:667
+#: forms_common.py:688
msgid "Author selection"
msgstr ""
-#: forms_common.py:681
+#: forms_common.py:702
msgid "There are identical authors."
msgstr ""
-#: forms_common.py:685 models.py:2228 models.py:2270
+#: forms_common.py:706 models.py:2265 models.py:2307
#: templates/sheet_ope.html:106
#: templates/ishtar/blocks/window_tables/documents.html:7
msgid "Authors"
@@ -446,11 +492,11 @@ msgstr ""
msgid "Merge"
msgstr ""
-#: ishtar_menu.py:61 ishtar_menu.py:88 models.py:1830 widgets.py:110
+#: ishtar_menu.py:61 ishtar_menu.py:88 models.py:1864 widgets.py:110
msgid "Delete"
msgstr ""
-#: ishtar_menu.py:96 models.py:1804
+#: ishtar_menu.py:96 models.py:1838
msgid "Imports"
msgstr ""
@@ -490,7 +536,7 @@ msgstr ""
msgid "Available"
msgstr ""
-#: models.py:479 models.py:1584
+#: models.py:479 models.py:1616
msgid "Key"
msgstr ""
@@ -506,7 +552,7 @@ msgstr ""
msgid "Creator"
msgstr ""
-#: models.py:692 models.py:2352
+#: models.py:692 models.py:2389
msgid "Order"
msgstr ""
@@ -518,7 +564,7 @@ msgstr ""
msgid "Cannot have symmetrical and an inverse_relation"
msgstr ""
-#: models.py:776 models.py:1295
+#: models.py:776 models.py:1327
msgid "Slug"
msgstr ""
@@ -566,7 +612,7 @@ msgstr ""
msgid "Description of the variable"
msgstr ""
-#: models.py:849 models.py:1585
+#: models.py:849 models.py:1617
msgid "Value"
msgstr ""
@@ -579,8 +625,10 @@ msgid "Total"
msgstr ""
#: models.py:969 models.py:1093 models.py:1105
+#: templates/ishtar/sheet_person.html:26
#: templates/ishtar/dashboards/dashboard_main_detail.html:135
#: templates/ishtar/dashboards/dashboard_main_detail_users.html:26
+#: templates/ishtar/wizard/wizard_person.html:20
msgid "Number"
msgstr ""
@@ -600,7 +648,7 @@ msgstr ""
msgid "Document templates"
msgstr ""
-#: models.py:1096 models.py:1106 models.py:1788
+#: models.py:1096 models.py:1106 models.py:1822
msgid "State"
msgstr ""
@@ -612,526 +660,546 @@ msgstr ""
msgid "Departments"
msgstr ""
-#: models.py:1165
+#: models.py:1148
+msgid "Raw phone"
+msgstr ""
+
+#: models.py:1154
+msgid "Alternative address is prefered"
+msgstr ""
+
+#: models.py:1193
msgid "Tel: "
msgstr ""
-#: models.py:1169
+#: models.py:1197
msgid "Mobile: "
msgstr ""
-#: models.py:1173
+#: models.py:1201
msgid "Email: "
msgstr ""
-#: models.py:1178
+#: models.py:1206
msgid "Merge key"
msgstr ""
-#: models.py:1239
+#: models.py:1267
msgid "Organization types"
msgstr ""
-#: models.py:1253
+#: models.py:1283
msgid "Archaeological site"
msgstr ""
-#: models.py:1254
+#: models.py:1284
msgid "Parcels"
msgstr ""
-#: models.py:1256
+#: models.py:1286
msgid "Operation source"
msgstr ""
-#: models.py:1259 views.py:945 views.py:996
+#: models.py:1289 views.py:945 views.py:996
msgid "Archaeological files"
msgstr ""
-#: models.py:1261 views.py:948 views.py:1004
+#: models.py:1291 views.py:948 views.py:1004
msgid "Context records"
msgstr ""
-#: models.py:1263 views.py:950 views.py:1007
+#: models.py:1293
+msgid "Context record relations"
+msgstr ""
+
+#: models.py:1295 views.py:950 views.py:1007
msgid "Finds"
msgstr ""
-#: models.py:1299 templates/ishtar/dashboards/dashboard_main.html:26
+#: models.py:1331 templates/ishtar/dashboards/dashboard_main.html:26
msgid "Users"
msgstr ""
-#: models.py:1301
+#: models.py:1333
msgid "Associated model"
msgstr ""
-#: models.py:1304
+#: models.py:1336
msgid "Is template"
msgstr ""
-#: models.py:1305
+#: models.py:1337
msgid "Unicity keys (separator \";\")"
msgstr ""
-#: models.py:1309
+#: models.py:1341
msgid "Importer - Type"
msgstr ""
-#: models.py:1310
+#: models.py:1342
msgid "Importer - Types"
msgstr ""
-#: models.py:1400
+#: models.py:1432
msgid "Importer - Default"
msgstr ""
-#: models.py:1401
+#: models.py:1433
msgid "Importer - Defaults"
msgstr ""
-#: models.py:1436
+#: models.py:1468
msgid "Importer - Default value"
msgstr ""
-#: models.py:1437
+#: models.py:1469
msgid "Importer - Default values"
msgstr ""
-#: models.py:1469
+#: models.py:1501
msgid "Column number"
msgstr ""
-#: models.py:1472
+#: models.py:1504
msgid "Required"
msgstr ""
-#: models.py:1475
+#: models.py:1507
msgid "Importer - Column"
msgstr ""
-#: models.py:1476
+#: models.py:1508
msgid "Importer - Columns"
msgstr ""
-#: models.py:1496
+#: models.py:1528
msgid "Field name"
msgstr ""
-#: models.py:1498 models.py:1532
+#: models.py:1530 models.py:1564
msgid "Force creation of new items"
msgstr ""
-#: models.py:1500 models.py:1534
+#: models.py:1532 models.py:1566
msgid "Concatenate with existing"
msgstr ""
-#: models.py:1502 models.py:1536
+#: models.py:1534 models.py:1568
msgid "Concatenate character"
msgstr ""
-#: models.py:1506
+#: models.py:1538
msgid "Importer - Duplicate field"
msgstr ""
-#: models.py:1507
+#: models.py:1539
msgid "Importer - Duplicate fields"
msgstr ""
-#: models.py:1514
+#: models.py:1546
msgid "Regular expression"
msgstr ""
-#: models.py:1517
+#: models.py:1549
msgid "Importer - Regular expression"
msgstr ""
-#: models.py:1518
+#: models.py:1550
msgid "Importer - Regular expressions"
msgstr ""
-#: models.py:1541
+#: models.py:1573
msgid "Importer - Target"
msgstr ""
-#: models.py:1542
+#: models.py:1574
msgid "Importer - Targets"
msgstr ""
-#: models.py:1566 views.py:311
+#: models.py:1598 views.py:311
msgid "True"
msgstr ""
-#: models.py:1567 views.py:313
+#: models.py:1599 views.py:313
msgid "False"
msgstr ""
-#: models.py:1586
+#: models.py:1618
msgid "Is set"
msgstr ""
-#: models.py:1593
+#: models.py:1625
msgid "Importer - Target key"
msgstr ""
-#: models.py:1594
+#: models.py:1626
msgid "Importer - Targets keys"
msgstr ""
-#: models.py:1645 models.py:2255 models.py:2266
+#: models.py:1677 models.py:2292 models.py:2303
msgid "Format"
msgstr ""
-#: models.py:1646 models.py:2356
+#: models.py:1678 models.py:2393
msgid "Operation type"
msgstr ""
-#: models.py:1647
+#: models.py:1679
msgid "Period"
msgstr ""
-#: models.py:1648
+#: models.py:1680
msgid "Unit"
msgstr ""
-#: models.py:1649
+#: models.py:1681
msgid "Material"
msgstr ""
-#: models.py:1651
+#: models.py:1683
msgid "Conservatory state"
msgstr ""
-#: models.py:1652
+#: models.py:1684
msgid "Preservation type"
msgstr ""
-#: models.py:1653
+#: models.py:1685
msgid "Object type"
msgstr ""
-#: models.py:1655
+#: models.py:1687
msgid "Identification type"
msgstr ""
-#: models.py:1656 models.py:2249
+#: models.py:1689
+msgid "Context record relation type"
+msgstr ""
+
+#: models.py:1690 models.py:2286
msgid "Support type"
msgstr ""
-#: models.py:1662
+#: models.py:1696
msgid "Integer"
msgstr ""
-#: models.py:1663
+#: models.py:1697
msgid "Float"
msgstr ""
-#: models.py:1664
+#: models.py:1698
msgid "String"
msgstr ""
-#: models.py:1665 templates/sheet_ope.html:86
+#: models.py:1699 templates/sheet_ope.html:86
msgid "Date"
msgstr ""
-#: models.py:1667 templates/sheet_ope.html:61 templates/sheet_ope.html.py:83
-#: templates/ishtar/sheet_person.html:54
+#: models.py:1701 templates/sheet_ope.html:61 templates/sheet_ope.html.py:83
+#: templates/ishtar/sheet_person.html:93
#: templates/ishtar/dashboards/dashboard_main_detail.html:120
msgid "Year"
msgstr ""
-#: models.py:1668
+#: models.py:1702
msgid "String to boolean"
msgstr ""
-#: models.py:1669
+#: models.py:1703
msgctxt "filesystem"
msgid "File"
msgstr ""
-#: models.py:1670
+#: models.py:1704
msgid "Unknow type"
msgstr ""
-#: models.py:1686
+#: models.py:1720
msgid "4 digit year. e.g.: \"2015\""
msgstr ""
-#: models.py:1687
+#: models.py:1721
msgid "4 digit year/month/day. e.g.: \"2015/02/04\""
msgstr ""
-#: models.py:1688
+#: models.py:1722
msgid "Day/month/4 digit year. e.g.: \"04/02/2015\""
msgstr ""
-#: models.py:1698
+#: models.py:1732
msgid "Options"
msgstr ""
-#: models.py:1700
+#: models.py:1734
msgid "Split character(s)"
msgstr ""
-#: models.py:1704
+#: models.py:1738
msgid "Importer - Formater type"
msgstr ""
-#: models.py:1705
+#: models.py:1739
msgid "Importer - Formater types"
msgstr ""
-#: models.py:1752 templates/ishtar/dashboards/dashboard_main_detail.html:61
+#: models.py:1786 templates/ishtar/dashboards/dashboard_main_detail.html:61
msgid "Created"
msgstr ""
-#: models.py:1753
+#: models.py:1787
msgid "Analyse in progress"
msgstr ""
-#: models.py:1754
+#: models.py:1788
msgid "Analysed"
msgstr ""
-#: models.py:1755
+#: models.py:1789
msgid "Import pending"
msgstr ""
-#: models.py:1756
+#: models.py:1790
msgid "Import in progress"
msgstr ""
-#: models.py:1757
+#: models.py:1791
msgid "Finished with errors"
msgstr ""
-#: models.py:1758
+#: models.py:1792
msgid "Finished"
msgstr ""
-#: models.py:1759
+#: models.py:1793
msgid "Archived"
msgstr ""
-#: models.py:1771
+#: models.py:1805
msgid "Imported file"
msgstr ""
-#: models.py:1774
+#: models.py:1808
msgid "Associated images (zip file)"
msgstr ""
-#: models.py:1776
+#: models.py:1810
msgid "Encoding"
msgstr ""
-#: models.py:1778
+#: models.py:1812
msgid "Skip lines"
msgstr ""
-#: models.py:1779 templates/ishtar/import_list.html:47
+#: models.py:1813 templates/ishtar/import_list.html:47
msgid "Error file"
msgstr ""
-#: models.py:1782
+#: models.py:1816
msgid "Result file"
msgstr ""
-#: models.py:1785 templates/ishtar/import_list.html:53
+#: models.py:1819 templates/ishtar/import_list.html:53
msgid "Match file"
msgstr ""
-#: models.py:1791
+#: models.py:1825
msgid "Conservative import"
msgstr ""
-#: models.py:1796
+#: models.py:1830
msgid "End date"
msgstr ""
-#: models.py:1798
+#: models.py:1832
msgid "Remaining seconds"
msgstr ""
-#: models.py:1803
+#: models.py:1837
msgid "Import"
msgstr ""
-#: models.py:1820
+#: models.py:1854
msgid "Analyse"
msgstr ""
-#: models.py:1822 models.py:1825
+#: models.py:1856 models.py:1859
msgid "Re-analyse"
msgstr ""
-#: models.py:1823
+#: models.py:1857
msgid "Launch import"
msgstr ""
-#: models.py:1826
+#: models.py:1860
msgid "Re-import"
msgstr ""
-#: models.py:1827
+#: models.py:1861
msgid "Archive"
msgstr ""
-#: models.py:1829
+#: models.py:1863
msgid "Unarchive"
msgstr ""
-#: models.py:1962
+#: models.py:1996
msgid "Organizations"
msgstr ""
-#: models.py:1964
+#: models.py:1998
msgid "Can view all Organizations"
msgstr ""
-#: models.py:1965
+#: models.py:1999
msgid "Can view own Organization"
msgstr ""
-#: models.py:1966
+#: models.py:2000
msgid "Can add own Organization"
msgstr ""
-#: models.py:1968
+#: models.py:2002
msgid "Can change own Organization"
msgstr ""
-#: models.py:1970
+#: models.py:2004
msgid "Can delete own Organization"
msgstr ""
-#: models.py:2005
+#: models.py:2039
msgid "Groups"
msgstr ""
-#: models.py:2010
+#: models.py:2044
msgid "Person types"
msgstr ""
-#: models.py:2017
+#: models.py:2051
msgid "Mr"
msgstr ""
-#: models.py:2018
+#: models.py:2052
msgid "Miss"
msgstr ""
-#: models.py:2019
+#: models.py:2053
msgid "Mr and Mrs"
msgstr ""
-#: models.py:2020
+#: models.py:2054
msgid "Mrs"
msgstr ""
-#: models.py:2021
+#: models.py:2055
msgid "Doctor"
msgstr ""
-#: models.py:2033 models.py:2080
+#: models.py:2067
+msgid "Contact type"
+msgstr ""
+
+#: models.py:2070 models.py:2117
msgid "Types"
msgstr ""
-#: models.py:2036
+#: models.py:2073
msgid "Is attached to"
msgstr ""
-#: models.py:2040
+#: models.py:2077
msgid "Persons"
msgstr ""
-#: models.py:2042
+#: models.py:2079
msgid "Can view all Persons"
msgstr ""
-#: models.py:2043
+#: models.py:2080
msgid "Can view own Person"
msgstr ""
-#: models.py:2044
+#: models.py:2081
msgid "Can add own Person"
msgstr ""
-#: models.py:2045
+#: models.py:2082
msgid "Can change own Person"
msgstr ""
-#: models.py:2046
+#: models.py:2083
msgid "Can delete own Person"
msgstr ""
-#: models.py:2172
+#: models.py:2209
msgid "Ishtar user"
msgstr ""
-#: models.py:2173
+#: models.py:2210
msgid "Ishtar users"
msgstr ""
-#: models.py:2218
+#: models.py:2255
msgid "Author types"
msgstr ""
-#: models.py:2244
+#: models.py:2281
msgid "Source types"
msgstr ""
-#: models.py:2250
+#: models.py:2287
msgid "Support types"
msgstr ""
-#: models.py:2256
+#: models.py:2293
msgid "Formats"
msgstr ""
-#: models.py:2261
+#: models.py:2298
msgid "External ID"
msgstr ""
-#: models.py:2264
+#: models.py:2301
msgid "Support"
msgstr ""
-#: models.py:2268
+#: models.py:2305
msgid "Scale"
msgstr ""
-#: models.py:2282
+#: models.py:2319
msgid "Item number"
msgstr ""
-#: models.py:2283
+#: models.py:2320
msgid "Ref."
msgstr ""
-#: models.py:2286
+#: models.py:2323
msgid "Internal ref."
msgstr ""
-#: models.py:2327
+#: models.py:2364
msgid "Surface (m2)"
msgstr ""
-#: models.py:2328 templates/sheet_ope.html:46 templates/sheet_ope.html.py:107
+#: models.py:2365 templates/sheet_ope.html:46 templates/sheet_ope.html.py:107
msgid "Localisation"
msgstr ""
-#: models.py:2353
+#: models.py:2390
msgid "Is preventive"
msgstr ""
-#: models.py:2357
+#: models.py:2394
msgid "Operation types"
msgstr ""
-#: models.py:2383
+#: models.py:2420
msgid "Preventive"
msgstr ""
-#: models.py:2384
+#: models.py:2421
msgid "Research"
msgstr ""
@@ -1218,7 +1286,7 @@ msgstr ""
msgid "No"
msgstr ""
-#: wizards.py:1211
+#: wizards.py:1215
#, python-format
msgid "[%(app_name)s] Account creation/modification"
msgstr ""
@@ -1493,7 +1561,7 @@ msgstr ""
msgid "Documentation"
msgstr ""
-#: templates/sheet_ope.html:102 templates/ishtar/sheet_person.html:52
+#: templates/sheet_ope.html:102 templates/ishtar/sheet_person.html:91
msgid "Documents"
msgstr ""
@@ -1583,7 +1651,7 @@ msgstr ""
#: templates/ishtar/form.html:10 templates/ishtar/formset.html:8
#: templates/ishtar/import_list.html:58 templates/ishtar/merge.html:31
#: templates/ishtar/wizard/confirm_wizard.html:42
-#: templates/ishtar/wizard/default_wizard.html:29
+#: templates/ishtar/wizard/default_wizard.html:30
#: templates/ishtar/wizard/search.html:13
#: templates/ishtar/wizard/validation_bar.html:4
msgid "Validate"
@@ -1721,28 +1789,44 @@ msgid "No person in this organization"
msgstr ""
#: templates/ishtar/sheet_person.html:25
+#: templates/ishtar/wizard/wizard_person.html:19
+msgid "Phone type"
+msgstr ""
+
+#: templates/ishtar/sheet_person.html:48
+#: templates/ishtar/wizard/wizard_person.html:42
+msgid "Business address"
+msgstr ""
+
+#: templates/ishtar/sheet_person.html:56
+#: templates/ishtar/wizard/wizard_person.html:51
+msgid "Other address"
+msgstr ""
+
+#: templates/ishtar/sheet_person.html:64
msgid "Associated organization"
msgstr ""
-#: templates/ishtar/sheet_person.html:36
+#: templates/ishtar/sheet_person.html:75
msgid "Associated operations as scientist"
msgstr ""
-#: templates/ishtar/sheet_person.html:40
+#: templates/ishtar/sheet_person.html:79
msgid "Associated operations as responsible"
msgstr ""
-#: templates/ishtar/sheet_person.html:46
+#: templates/ishtar/sheet_person.html:85
msgid "Associated archaelogical files"
msgstr ""
-#: templates/ishtar/sheet_person.html:57 templates/ishtar/sheet_person.html:65
+#: templates/ishtar/sheet_person.html:96
+#: templates/ishtar/sheet_person.html:104
#: templates/ishtar/blocks/window_tables/documents.html:9
#: templates/ishtar/blocks/window_tables/documents.html:17
msgid "Link"
msgstr ""
-#: templates/ishtar/sheet_person.html:69
+#: templates/ishtar/sheet_person.html:108
msgid "No document associated to this person"
msgstr ""
@@ -1849,7 +1933,7 @@ msgstr ""
msgid "Would you like to save them?"
msgstr ""
-#: templates/ishtar/wizard/default_wizard.html:35
+#: templates/ishtar/wizard/default_wizard.html:36
#: templates/ishtar/wizard/parcels_wizard.html:24
#: templates/ishtar/wizard/relations_wizard.html:23
#: templates/ishtar/wizard/search.html:20
@@ -1857,7 +1941,7 @@ msgstr ""
msgid "Add/Modify"
msgstr ""
-#: templates/ishtar/wizard/default_wizard.html:56
+#: templates/ishtar/wizard/default_wizard.html:58
msgid ""
"The form has changed if you don't validate it all your changes will be lost."
msgstr ""
diff --git a/ishtar_common/menu_base.py b/ishtar_common/menu_base.py
index eb08d8c78..d8ee0775c 100644
--- a/ishtar_common/menu_base.py
+++ b/ishtar_common/menu_base.py
@@ -107,7 +107,8 @@ class MenuItem:
prefix = (self.model._meta.app_label + '.') if self.model else ''
for access_control in self.access_controls:
access_control = prefix + access_control
- if user.has_perm(access_control, self.model, obj):
+ if user.has_perm(access_control, self.model, obj=obj,
+ session=session):
return True
# manage by person type
if hasattr(user, 'ishtaruser'):
diff --git a/ishtar_common/menus.py b/ishtar_common/menus.py
index e55b288bf..36b53b162 100644
--- a/ishtar_common/menus.py
+++ b/ishtar_common/menus.py
@@ -59,12 +59,20 @@ class Menu:
self.current_action = current_action
self.selected_idx = None
self.session = session
+ self.items_by_idx = {}
def init(self):
if self.initialized:
return
self.items = {}
+ self.items_by_idx = {}
for idx, main_menu in enumerate(self.childs):
+ self.items_by_idx[main_menu.idx] = main_menu
+ for child in main_menu.childs:
+ self.items_by_idx[child.idx] = child
+ if hasattr(child, 'childs'):
+ for subchild in child.childs:
+ self.items_by_idx[subchild.idx] = subchild
selected = main_menu.set_items(
self.user, self.items,
self.current_action, session=self.session)
diff --git a/ishtar_common/migrations/0049_auto__add_field_person_alt_address__add_field_person_alt_address_compl.py b/ishtar_common/migrations/0049_auto__add_field_person_alt_address__add_field_person_alt_address_compl.py
new file mode 100644
index 000000000..d64e3a964
--- /dev/null
+++ b/ishtar_common/migrations/0049_auto__add_field_person_alt_address__add_field_person_alt_address_compl.py
@@ -0,0 +1,699 @@
+# -*- 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 'Person.alt_address'
+ db.add_column('ishtar_common_person', 'alt_address',
+ self.gf('django.db.models.fields.TextField')(null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Person.alt_address_complement'
+ db.add_column('ishtar_common_person', 'alt_address_complement',
+ self.gf('django.db.models.fields.TextField')(null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Person.alt_postal_code'
+ db.add_column('ishtar_common_person', 'alt_postal_code',
+ self.gf('django.db.models.fields.CharField')(max_length=10, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Person.alt_town'
+ db.add_column('ishtar_common_person', 'alt_town',
+ self.gf('django.db.models.fields.CharField')(max_length=70, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Person.alt_country'
+ db.add_column('ishtar_common_person', 'alt_country',
+ self.gf('django.db.models.fields.CharField')(max_length=30, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Person.phone_desc'
+ db.add_column('ishtar_common_person', 'phone_desc',
+ self.gf('django.db.models.fields.CharField')(max_length=70, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Person.phone2'
+ db.add_column('ishtar_common_person', 'phone2',
+ self.gf('django.db.models.fields.CharField')(max_length=18, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Person.phone_desc2'
+ db.add_column('ishtar_common_person', 'phone_desc2',
+ self.gf('django.db.models.fields.CharField')(max_length=70, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Person.phone3'
+ db.add_column('ishtar_common_person', 'phone3',
+ self.gf('django.db.models.fields.CharField')(max_length=18, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Person.phone_desc3'
+ db.add_column('ishtar_common_person', 'phone_desc3',
+ self.gf('django.db.models.fields.CharField')(max_length=70, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Person.raw_phone'
+ db.add_column('ishtar_common_person', 'raw_phone',
+ self.gf('django.db.models.fields.TextField')(null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Person.alt_address_is_prefered'
+ db.add_column('ishtar_common_person', 'alt_address_is_prefered',
+ self.gf('django.db.models.fields.BooleanField')(default=False),
+ keep_default=False)
+
+ # Adding field 'Person.contact_type'
+ db.add_column('ishtar_common_person', 'contact_type',
+ self.gf('django.db.models.fields.CharField')(max_length=300, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Person.comment'
+ db.add_column('ishtar_common_person', 'comment',
+ self.gf('django.db.models.fields.TextField')(null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'HistoricalOrganization.alt_address'
+ db.add_column('ishtar_common_historicalorganization', 'alt_address',
+ self.gf('django.db.models.fields.TextField')(null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'HistoricalOrganization.alt_address_complement'
+ db.add_column('ishtar_common_historicalorganization', 'alt_address_complement',
+ self.gf('django.db.models.fields.TextField')(null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'HistoricalOrganization.alt_postal_code'
+ db.add_column('ishtar_common_historicalorganization', 'alt_postal_code',
+ self.gf('django.db.models.fields.CharField')(max_length=10, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'HistoricalOrganization.alt_town'
+ db.add_column('ishtar_common_historicalorganization', 'alt_town',
+ self.gf('django.db.models.fields.CharField')(max_length=70, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'HistoricalOrganization.alt_country'
+ db.add_column('ishtar_common_historicalorganization', 'alt_country',
+ self.gf('django.db.models.fields.CharField')(max_length=30, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'HistoricalOrganization.phone_desc'
+ db.add_column('ishtar_common_historicalorganization', 'phone_desc',
+ self.gf('django.db.models.fields.CharField')(max_length=70, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'HistoricalOrganization.phone2'
+ db.add_column('ishtar_common_historicalorganization', 'phone2',
+ self.gf('django.db.models.fields.CharField')(max_length=18, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'HistoricalOrganization.phone_desc2'
+ db.add_column('ishtar_common_historicalorganization', 'phone_desc2',
+ self.gf('django.db.models.fields.CharField')(max_length=70, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'HistoricalOrganization.phone3'
+ db.add_column('ishtar_common_historicalorganization', 'phone3',
+ self.gf('django.db.models.fields.CharField')(max_length=18, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'HistoricalOrganization.phone_desc3'
+ db.add_column('ishtar_common_historicalorganization', 'phone_desc3',
+ self.gf('django.db.models.fields.CharField')(max_length=70, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'HistoricalOrganization.raw_phone'
+ db.add_column('ishtar_common_historicalorganization', 'raw_phone',
+ self.gf('django.db.models.fields.TextField')(null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'HistoricalOrganization.alt_address_is_prefered'
+ db.add_column('ishtar_common_historicalorganization', 'alt_address_is_prefered',
+ self.gf('django.db.models.fields.BooleanField')(default=False),
+ keep_default=False)
+
+ # Adding field 'Organization.alt_address'
+ db.add_column('ishtar_common_organization', 'alt_address',
+ self.gf('django.db.models.fields.TextField')(null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Organization.alt_address_complement'
+ db.add_column('ishtar_common_organization', 'alt_address_complement',
+ self.gf('django.db.models.fields.TextField')(null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Organization.alt_postal_code'
+ db.add_column('ishtar_common_organization', 'alt_postal_code',
+ self.gf('django.db.models.fields.CharField')(max_length=10, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Organization.alt_town'
+ db.add_column('ishtar_common_organization', 'alt_town',
+ self.gf('django.db.models.fields.CharField')(max_length=70, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Organization.alt_country'
+ db.add_column('ishtar_common_organization', 'alt_country',
+ self.gf('django.db.models.fields.CharField')(max_length=30, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Organization.phone_desc'
+ db.add_column('ishtar_common_organization', 'phone_desc',
+ self.gf('django.db.models.fields.CharField')(max_length=70, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Organization.phone2'
+ db.add_column('ishtar_common_organization', 'phone2',
+ self.gf('django.db.models.fields.CharField')(max_length=18, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Organization.phone_desc2'
+ db.add_column('ishtar_common_organization', 'phone_desc2',
+ self.gf('django.db.models.fields.CharField')(max_length=70, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Organization.phone3'
+ db.add_column('ishtar_common_organization', 'phone3',
+ self.gf('django.db.models.fields.CharField')(max_length=18, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Organization.phone_desc3'
+ db.add_column('ishtar_common_organization', 'phone_desc3',
+ self.gf('django.db.models.fields.CharField')(max_length=70, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Organization.raw_phone'
+ db.add_column('ishtar_common_organization', 'raw_phone',
+ self.gf('django.db.models.fields.TextField')(null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Organization.alt_address_is_prefered'
+ db.add_column('ishtar_common_organization', 'alt_address_is_prefered',
+ self.gf('django.db.models.fields.BooleanField')(default=False),
+ keep_default=False)
+
+
+ def backwards(self, orm):
+ # Deleting field 'Person.alt_address'
+ db.delete_column('ishtar_common_person', 'alt_address')
+
+ # Deleting field 'Person.alt_address_complement'
+ db.delete_column('ishtar_common_person', 'alt_address_complement')
+
+ # Deleting field 'Person.alt_postal_code'
+ db.delete_column('ishtar_common_person', 'alt_postal_code')
+
+ # Deleting field 'Person.alt_town'
+ db.delete_column('ishtar_common_person', 'alt_town')
+
+ # Deleting field 'Person.alt_country'
+ db.delete_column('ishtar_common_person', 'alt_country')
+
+ # Deleting field 'Person.phone_desc'
+ db.delete_column('ishtar_common_person', 'phone_desc')
+
+ # Deleting field 'Person.phone2'
+ db.delete_column('ishtar_common_person', 'phone2')
+
+ # Deleting field 'Person.phone_desc2'
+ db.delete_column('ishtar_common_person', 'phone_desc2')
+
+ # Deleting field 'Person.phone3'
+ db.delete_column('ishtar_common_person', 'phone3')
+
+ # Deleting field 'Person.phone_desc3'
+ db.delete_column('ishtar_common_person', 'phone_desc3')
+
+ # Deleting field 'Person.raw_phone'
+ db.delete_column('ishtar_common_person', 'raw_phone')
+
+ # Deleting field 'Person.alt_address_is_prefered'
+ db.delete_column('ishtar_common_person', 'alt_address_is_prefered')
+
+ # Deleting field 'Person.contact_type'
+ db.delete_column('ishtar_common_person', 'contact_type')
+
+ # Deleting field 'Person.comment'
+ db.delete_column('ishtar_common_person', 'comment')
+
+ # Deleting field 'HistoricalOrganization.alt_address'
+ db.delete_column('ishtar_common_historicalorganization', 'alt_address')
+
+ # Deleting field 'HistoricalOrganization.alt_address_complement'
+ db.delete_column('ishtar_common_historicalorganization', 'alt_address_complement')
+
+ # Deleting field 'HistoricalOrganization.alt_postal_code'
+ db.delete_column('ishtar_common_historicalorganization', 'alt_postal_code')
+
+ # Deleting field 'HistoricalOrganization.alt_town'
+ db.delete_column('ishtar_common_historicalorganization', 'alt_town')
+
+ # Deleting field 'HistoricalOrganization.alt_country'
+ db.delete_column('ishtar_common_historicalorganization', 'alt_country')
+
+ # Deleting field 'HistoricalOrganization.phone_desc'
+ db.delete_column('ishtar_common_historicalorganization', 'phone_desc')
+
+ # Deleting field 'HistoricalOrganization.phone2'
+ db.delete_column('ishtar_common_historicalorganization', 'phone2')
+
+ # Deleting field 'HistoricalOrganization.phone_desc2'
+ db.delete_column('ishtar_common_historicalorganization', 'phone_desc2')
+
+ # Deleting field 'HistoricalOrganization.phone3'
+ db.delete_column('ishtar_common_historicalorganization', 'phone3')
+
+ # Deleting field 'HistoricalOrganization.phone_desc3'
+ db.delete_column('ishtar_common_historicalorganization', 'phone_desc3')
+
+ # Deleting field 'HistoricalOrganization.raw_phone'
+ db.delete_column('ishtar_common_historicalorganization', 'raw_phone')
+
+ # Deleting field 'HistoricalOrganization.alt_address_is_prefered'
+ db.delete_column('ishtar_common_historicalorganization', 'alt_address_is_prefered')
+
+ # Deleting field 'Organization.alt_address'
+ db.delete_column('ishtar_common_organization', 'alt_address')
+
+ # Deleting field 'Organization.alt_address_complement'
+ db.delete_column('ishtar_common_organization', 'alt_address_complement')
+
+ # Deleting field 'Organization.alt_postal_code'
+ db.delete_column('ishtar_common_organization', 'alt_postal_code')
+
+ # Deleting field 'Organization.alt_town'
+ db.delete_column('ishtar_common_organization', 'alt_town')
+
+ # Deleting field 'Organization.alt_country'
+ db.delete_column('ishtar_common_organization', 'alt_country')
+
+ # Deleting field 'Organization.phone_desc'
+ db.delete_column('ishtar_common_organization', 'phone_desc')
+
+ # Deleting field 'Organization.phone2'
+ db.delete_column('ishtar_common_organization', 'phone2')
+
+ # Deleting field 'Organization.phone_desc2'
+ db.delete_column('ishtar_common_organization', 'phone_desc2')
+
+ # Deleting field 'Organization.phone3'
+ db.delete_column('ishtar_common_organization', 'phone3')
+
+ # Deleting field 'Organization.phone_desc3'
+ db.delete_column('ishtar_common_organization', 'phone_desc3')
+
+ # Deleting field 'Organization.raw_phone'
+ db.delete_column('ishtar_common_organization', 'raw_phone')
+
+ # Deleting field 'Organization.alt_address_is_prefered'
+ db.delete_column('ishtar_common_organization', 'alt_address_is_prefered')
+
+
+ models = {
+ 'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'auth.permission': {
+ 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ 'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ 'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ 'ishtar_common.arrondissement': {
+ 'Meta': {'object_name': 'Arrondissement'},
+ 'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'})
+ },
+ 'ishtar_common.author': {
+ 'Meta': {'object_name': 'Author'},
+ 'author_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.AuthorType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'person': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'author'", 'to': "orm['ishtar_common.Person']"})
+ },
+ 'ishtar_common.authortype': {
+ 'Meta': {'object_name': 'AuthorType'},
+ 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ 'ishtar_common.canton': {
+ 'Meta': {'object_name': 'Canton'},
+ 'arrondissement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Arrondissement']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'})
+ },
+ 'ishtar_common.department': {
+ 'Meta': {'ordering': "['number']", 'object_name': 'Department'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
+ 'number': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '3'}),
+ 'state': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.State']", 'null': 'True', 'blank': 'True'})
+ },
+ 'ishtar_common.documenttemplate': {
+ 'Meta': {'ordering': "['associated_object_name', 'name']", 'object_name': 'DocumentTemplate'},
+ 'associated_object_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'template': ('django.db.models.fields.files.FileField', [], {'max_length': '100'})
+ },
+ 'ishtar_common.format': {
+ 'Meta': {'object_name': 'Format'},
+ 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ 'ishtar_common.formatertype': {
+ 'Meta': {'ordering': "('formater_type', 'options')", 'unique_together': "(('formater_type', 'options', 'many_split'),)", 'object_name': 'FormaterType'},
+ 'formater_type': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'many_split': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'options': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'})
+ },
+ 'ishtar_common.globalvar': {
+ 'Meta': {'ordering': "['slug']", 'object_name': 'GlobalVar'},
+ 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
+ 'value': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'})
+ },
+ 'ishtar_common.historicalorganization': {
+ 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalOrganization'},
+ 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
+ 'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}),
+ 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}),
+ 'exclude_from_merge': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}),
+ 'history_creator_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'}),
+ 'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '300'}),
+ 'organization_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}),
+ 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'})
+ },
+ 'ishtar_common.import': {
+ 'Meta': {'object_name': 'Import'},
+ 'conservative_import': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}),
+ 'encoding': ('django.db.models.fields.CharField', [], {'default': "'utf-8'", 'max_length': '15'}),
+ 'end_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'error_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'imported_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
+ 'imported_images': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'importer_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.ImporterType']"}),
+ 'match_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'result_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'seconds_remaining': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
+ 'skip_lines': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
+ 'state': ('django.db.models.fields.CharField', [], {'default': "'C'", 'max_length': '2'}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.IshtarUser']"})
+ },
+ 'ishtar_common.importercolumn': {
+ 'Meta': {'ordering': "('importer_type', 'col_number')", 'unique_together': "(('importer_type', 'col_number'),)", 'object_name': 'ImporterColumn'},
+ 'col_number': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
+ 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'importer_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'columns'", 'to': "orm['ishtar_common.ImporterType']"}),
+ 'regexp_pre_filter': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Regexp']", 'null': 'True', 'blank': 'True'}),
+ 'required': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
+ },
+ 'ishtar_common.importerdefault': {
+ 'Meta': {'object_name': 'ImporterDefault'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'importer_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'defaults'", 'to': "orm['ishtar_common.ImporterType']"}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '500'})
+ },
+ 'ishtar_common.importerdefaultvalues': {
+ 'Meta': {'object_name': 'ImporterDefaultValues'},
+ 'default_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'default_values'", 'to': "orm['ishtar_common.ImporterDefault']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
+ 'value': ('django.db.models.fields.CharField', [], {'max_length': '500'})
+ },
+ 'ishtar_common.importerduplicatefield': {
+ 'Meta': {'object_name': 'ImporterDuplicateField'},
+ 'column': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'duplicate_fields'", 'to': "orm['ishtar_common.ImporterColumn']"}),
+ 'concat': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'concat_str': ('django.db.models.fields.CharField', [], {'max_length': '5', 'null': 'True', 'blank': 'True'}),
+ 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
+ 'force_new': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
+ },
+ 'ishtar_common.importertype': {
+ 'Meta': {'object_name': 'ImporterType'},
+ 'associated_models': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_template': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
+ 'unicity_keys': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}),
+ 'users': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['ishtar_common.IshtarUser']", 'null': 'True', 'blank': 'True'})
+ },
+ 'ishtar_common.importtarget': {
+ 'Meta': {'object_name': 'ImportTarget'},
+ 'column': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'targets'", 'to': "orm['ishtar_common.ImporterColumn']"}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'concat': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'concat_str': ('django.db.models.fields.CharField', [], {'max_length': '5', 'null': 'True', 'blank': 'True'}),
+ 'force_new': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'formater_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.FormaterType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'regexp_filter': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Regexp']", 'null': 'True', 'blank': 'True'}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '500'})
+ },
+ 'ishtar_common.ishtarsiteprofile': {
+ 'Meta': {'ordering': "['label']", 'object_name': 'IshtarSiteProfile'},
+ 'active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'context_record': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'files': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'find': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.TextField', [], {}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
+ 'warehouse': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
+ },
+ 'ishtar_common.ishtaruser': {
+ 'Meta': {'object_name': 'IshtarUser', '_ormbases': ['auth.User']},
+ 'person': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ishtaruser'", 'unique': 'True', 'to': "orm['ishtar_common.Person']"}),
+ 'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'})
+ },
+ 'ishtar_common.itemkey': {
+ 'Meta': {'object_name': 'ItemKey'},
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'importer': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Import']", 'null': 'True', 'blank': 'True'}),
+ 'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {})
+ },
+ 'ishtar_common.operationtype': {
+ 'Meta': {'ordering': "['-preventive', 'order', 'label']", 'object_name': 'OperationType'},
+ 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
+ 'preventive': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ 'ishtar_common.organization': {
+ 'Meta': {'object_name': 'Organization'},
+ 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
+ 'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}),
+ 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}),
+ 'exclude_from_merge': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}),
+ 'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}),
+ 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_organization'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}),
+ 'merge_candidate': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_candidate_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}),
+ 'merge_exclusion': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_exclusion_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}),
+ 'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '300'}),
+ 'organization_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.OrganizationType']"}),
+ 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}),
+ 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'})
+ },
+ 'ishtar_common.organizationtype': {
+ 'Meta': {'ordering': "('label',)", 'object_name': 'OrganizationType'},
+ 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ 'ishtar_common.person': {
+ 'Meta': {'object_name': 'Person'},
+ 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
+ 'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}),
+ 'attached_to': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'members'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'contact_type': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}),
+ 'exclude_from_merge': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}),
+ 'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}),
+ 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_person'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}),
+ 'merge_candidate': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_candidate_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}),
+ 'merge_exclusion': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_exclusion_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}),
+ 'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
+ 'person_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.PersonType']", 'symmetrical': 'False'}),
+ 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}),
+ 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'raw_name': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'surname': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'})
+ },
+ 'ishtar_common.persontype': {
+ 'Meta': {'ordering': "('label',)", 'object_name': 'PersonType'},
+ 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ 'ishtar_common.regexp': {
+ 'Meta': {'object_name': 'Regexp'},
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'regexp': ('django.db.models.fields.CharField', [], {'max_length': '500'})
+ },
+ 'ishtar_common.sourcetype': {
+ 'Meta': {'object_name': 'SourceType'},
+ 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ 'ishtar_common.state': {
+ 'Meta': {'ordering': "['number']", 'object_name': 'State'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
+ 'number': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '3'})
+ },
+ 'ishtar_common.supporttype': {
+ 'Meta': {'object_name': 'SupportType'},
+ 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ 'ishtar_common.targetkey': {
+ 'Meta': {'unique_together': "(('target', 'key', 'associated_user', 'associated_import'),)", 'object_name': 'TargetKey'},
+ 'associated_import': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Import']", 'null': 'True', 'blank': 'True'}),
+ 'associated_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.IshtarUser']", 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_set': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'key': ('django.db.models.fields.TextField', [], {}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'keys'", 'to': "orm['ishtar_common.ImportTarget']"}),
+ 'value': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'})
+ },
+ '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 = ['ishtar_common'] \ No newline at end of file
diff --git a/ishtar_common/migrations/0050_auto__chg_field_person_phone_desc3__chg_field_person_phone_desc2__chg_.py b/ishtar_common/migrations/0050_auto__chg_field_person_phone_desc3__chg_field_person_phone_desc2__chg_.py
new file mode 100644
index 000000000..b68b3b9bb
--- /dev/null
+++ b/ishtar_common/migrations/0050_auto__chg_field_person_phone_desc3__chg_field_person_phone_desc2__chg_.py
@@ -0,0 +1,479 @@
+# -*- 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):
+
+ # Changing field 'Person.phone_desc3'
+ db.alter_column('ishtar_common_person', 'phone_desc3', self.gf('django.db.models.fields.CharField')(max_length=300, null=True))
+
+ # Changing field 'Person.phone_desc2'
+ db.alter_column('ishtar_common_person', 'phone_desc2', self.gf('django.db.models.fields.CharField')(max_length=300, null=True))
+
+ # Changing field 'Person.phone_desc'
+ db.alter_column('ishtar_common_person', 'phone_desc', self.gf('django.db.models.fields.CharField')(max_length=300, null=True))
+
+ # Changing field 'Person.email'
+ db.alter_column('ishtar_common_person', 'email', self.gf('django.db.models.fields.EmailField')(max_length=300, null=True))
+
+ # Changing field 'HistoricalOrganization.phone_desc3'
+ db.alter_column('ishtar_common_historicalorganization', 'phone_desc3', self.gf('django.db.models.fields.CharField')(max_length=300, null=True))
+
+ # Changing field 'HistoricalOrganization.phone_desc2'
+ db.alter_column('ishtar_common_historicalorganization', 'phone_desc2', self.gf('django.db.models.fields.CharField')(max_length=300, null=True))
+
+ # Changing field 'HistoricalOrganization.phone_desc'
+ db.alter_column('ishtar_common_historicalorganization', 'phone_desc', self.gf('django.db.models.fields.CharField')(max_length=300, null=True))
+
+ # Changing field 'HistoricalOrganization.name'
+ db.alter_column('ishtar_common_historicalorganization', 'name', self.gf('django.db.models.fields.CharField')(max_length=500))
+
+ # Changing field 'HistoricalOrganization.email'
+ db.alter_column('ishtar_common_historicalorganization', 'email', self.gf('django.db.models.fields.EmailField')(max_length=300, null=True))
+
+ # Changing field 'Organization.phone_desc3'
+ db.alter_column('ishtar_common_organization', 'phone_desc3', self.gf('django.db.models.fields.CharField')(max_length=300, null=True))
+
+ # Changing field 'Organization.phone_desc2'
+ db.alter_column('ishtar_common_organization', 'phone_desc2', self.gf('django.db.models.fields.CharField')(max_length=300, null=True))
+
+ # Changing field 'Organization.phone_desc'
+ db.alter_column('ishtar_common_organization', 'phone_desc', self.gf('django.db.models.fields.CharField')(max_length=300, null=True))
+
+ # Changing field 'Organization.email'
+ db.alter_column('ishtar_common_organization', 'email', self.gf('django.db.models.fields.EmailField')(max_length=300, null=True))
+
+ # Changing field 'Organization.name'
+ db.alter_column('ishtar_common_organization', 'name', self.gf('django.db.models.fields.CharField')(max_length=500))
+
+ def backwards(self, orm):
+
+ # Changing field 'Person.phone_desc3'
+ db.alter_column('ishtar_common_person', 'phone_desc3', self.gf('django.db.models.fields.CharField')(max_length=70, null=True))
+
+ # Changing field 'Person.phone_desc2'
+ db.alter_column('ishtar_common_person', 'phone_desc2', self.gf('django.db.models.fields.CharField')(max_length=70, null=True))
+
+ # Changing field 'Person.phone_desc'
+ db.alter_column('ishtar_common_person', 'phone_desc', self.gf('django.db.models.fields.CharField')(max_length=70, null=True))
+
+ # Changing field 'Person.email'
+ db.alter_column('ishtar_common_person', 'email', self.gf('django.db.models.fields.EmailField')(max_length=75, null=True))
+
+ # Changing field 'HistoricalOrganization.phone_desc3'
+ db.alter_column('ishtar_common_historicalorganization', 'phone_desc3', self.gf('django.db.models.fields.CharField')(max_length=70, null=True))
+
+ # Changing field 'HistoricalOrganization.phone_desc2'
+ db.alter_column('ishtar_common_historicalorganization', 'phone_desc2', self.gf('django.db.models.fields.CharField')(max_length=70, null=True))
+
+ # Changing field 'HistoricalOrganization.phone_desc'
+ db.alter_column('ishtar_common_historicalorganization', 'phone_desc', self.gf('django.db.models.fields.CharField')(max_length=70, null=True))
+
+ # Changing field 'HistoricalOrganization.name'
+ db.alter_column('ishtar_common_historicalorganization', 'name', self.gf('django.db.models.fields.CharField')(max_length=300))
+
+ # Changing field 'HistoricalOrganization.email'
+ db.alter_column('ishtar_common_historicalorganization', 'email', self.gf('django.db.models.fields.EmailField')(max_length=75, null=True))
+
+ # Changing field 'Organization.phone_desc3'
+ db.alter_column('ishtar_common_organization', 'phone_desc3', self.gf('django.db.models.fields.CharField')(max_length=70, null=True))
+
+ # Changing field 'Organization.phone_desc2'
+ db.alter_column('ishtar_common_organization', 'phone_desc2', self.gf('django.db.models.fields.CharField')(max_length=70, null=True))
+
+ # Changing field 'Organization.phone_desc'
+ db.alter_column('ishtar_common_organization', 'phone_desc', self.gf('django.db.models.fields.CharField')(max_length=70, null=True))
+
+ # Changing field 'Organization.email'
+ db.alter_column('ishtar_common_organization', 'email', self.gf('django.db.models.fields.EmailField')(max_length=75, null=True))
+
+ # Changing field 'Organization.name'
+ db.alter_column('ishtar_common_organization', 'name', self.gf('django.db.models.fields.CharField')(max_length=300))
+
+ models = {
+ 'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'auth.permission': {
+ 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ 'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ 'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ 'ishtar_common.arrondissement': {
+ 'Meta': {'object_name': 'Arrondissement'},
+ 'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'})
+ },
+ 'ishtar_common.author': {
+ 'Meta': {'object_name': 'Author'},
+ 'author_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.AuthorType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'person': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'author'", 'to': "orm['ishtar_common.Person']"})
+ },
+ 'ishtar_common.authortype': {
+ 'Meta': {'object_name': 'AuthorType'},
+ 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ 'ishtar_common.canton': {
+ 'Meta': {'object_name': 'Canton'},
+ 'arrondissement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Arrondissement']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'})
+ },
+ 'ishtar_common.department': {
+ 'Meta': {'ordering': "['number']", 'object_name': 'Department'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
+ 'number': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '3'}),
+ 'state': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.State']", 'null': 'True', 'blank': 'True'})
+ },
+ 'ishtar_common.documenttemplate': {
+ 'Meta': {'ordering': "['associated_object_name', 'name']", 'object_name': 'DocumentTemplate'},
+ 'associated_object_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'template': ('django.db.models.fields.files.FileField', [], {'max_length': '100'})
+ },
+ 'ishtar_common.format': {
+ 'Meta': {'object_name': 'Format'},
+ 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ 'ishtar_common.formatertype': {
+ 'Meta': {'ordering': "('formater_type', 'options')", 'unique_together': "(('formater_type', 'options', 'many_split'),)", 'object_name': 'FormaterType'},
+ 'formater_type': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'many_split': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'options': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'})
+ },
+ 'ishtar_common.globalvar': {
+ 'Meta': {'ordering': "['slug']", 'object_name': 'GlobalVar'},
+ 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
+ 'value': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'})
+ },
+ 'ishtar_common.historicalorganization': {
+ 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalOrganization'},
+ 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
+ 'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}),
+ 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'exclude_from_merge': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}),
+ 'history_creator_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'history_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'history_modifier_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
+ 'history_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}),
+ 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
+ 'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
+ 'organization_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'})
+ },
+ 'ishtar_common.import': {
+ 'Meta': {'object_name': 'Import'},
+ 'conservative_import': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}),
+ 'encoding': ('django.db.models.fields.CharField', [], {'default': "'utf-8'", 'max_length': '15'}),
+ 'end_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'error_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'imported_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
+ 'imported_images': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'importer_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.ImporterType']"}),
+ 'match_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'result_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'seconds_remaining': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
+ 'skip_lines': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
+ 'state': ('django.db.models.fields.CharField', [], {'default': "'C'", 'max_length': '2'}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.IshtarUser']"})
+ },
+ 'ishtar_common.importercolumn': {
+ 'Meta': {'ordering': "('importer_type', 'col_number')", 'unique_together': "(('importer_type', 'col_number'),)", 'object_name': 'ImporterColumn'},
+ 'col_number': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
+ 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'importer_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'columns'", 'to': "orm['ishtar_common.ImporterType']"}),
+ 'regexp_pre_filter': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Regexp']", 'null': 'True', 'blank': 'True'}),
+ 'required': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
+ },
+ 'ishtar_common.importerdefault': {
+ 'Meta': {'object_name': 'ImporterDefault'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'importer_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'defaults'", 'to': "orm['ishtar_common.ImporterType']"}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '500'})
+ },
+ 'ishtar_common.importerdefaultvalues': {
+ 'Meta': {'object_name': 'ImporterDefaultValues'},
+ 'default_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'default_values'", 'to': "orm['ishtar_common.ImporterDefault']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
+ 'value': ('django.db.models.fields.CharField', [], {'max_length': '500'})
+ },
+ 'ishtar_common.importerduplicatefield': {
+ 'Meta': {'object_name': 'ImporterDuplicateField'},
+ 'column': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'duplicate_fields'", 'to': "orm['ishtar_common.ImporterColumn']"}),
+ 'concat': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'concat_str': ('django.db.models.fields.CharField', [], {'max_length': '5', 'null': 'True', 'blank': 'True'}),
+ 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
+ 'force_new': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
+ },
+ 'ishtar_common.importertype': {
+ 'Meta': {'object_name': 'ImporterType'},
+ 'associated_models': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_template': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
+ 'unicity_keys': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}),
+ 'users': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['ishtar_common.IshtarUser']", 'null': 'True', 'blank': 'True'})
+ },
+ 'ishtar_common.importtarget': {
+ 'Meta': {'object_name': 'ImportTarget'},
+ 'column': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'targets'", 'to': "orm['ishtar_common.ImporterColumn']"}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'concat': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'concat_str': ('django.db.models.fields.CharField', [], {'max_length': '5', 'null': 'True', 'blank': 'True'}),
+ 'force_new': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'formater_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.FormaterType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'regexp_filter': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Regexp']", 'null': 'True', 'blank': 'True'}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '500'})
+ },
+ 'ishtar_common.ishtarsiteprofile': {
+ 'Meta': {'ordering': "['label']", 'object_name': 'IshtarSiteProfile'},
+ 'active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'context_record': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'files': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'find': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.TextField', [], {}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
+ 'warehouse': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
+ },
+ 'ishtar_common.ishtaruser': {
+ 'Meta': {'object_name': 'IshtarUser', '_ormbases': ['auth.User']},
+ 'person': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ishtaruser'", 'unique': 'True', 'to': "orm['ishtar_common.Person']"}),
+ 'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'})
+ },
+ 'ishtar_common.itemkey': {
+ 'Meta': {'object_name': 'ItemKey'},
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'importer': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Import']", 'null': 'True', 'blank': 'True'}),
+ 'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {})
+ },
+ 'ishtar_common.operationtype': {
+ 'Meta': {'ordering': "['-preventive', 'order', 'label']", 'object_name': 'OperationType'},
+ 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
+ 'preventive': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ 'ishtar_common.organization': {
+ 'Meta': {'object_name': 'Organization'},
+ 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
+ 'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}),
+ 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'exclude_from_merge': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}),
+ 'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}),
+ 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_organization'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}),
+ 'merge_candidate': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_candidate_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}),
+ 'merge_exclusion': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_exclusion_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}),
+ 'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
+ 'organization_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.OrganizationType']"}),
+ 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'})
+ },
+ 'ishtar_common.organizationtype': {
+ 'Meta': {'ordering': "('label',)", 'object_name': 'OrganizationType'},
+ 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ 'ishtar_common.person': {
+ 'Meta': {'object_name': 'Person'},
+ 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
+ 'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}),
+ 'attached_to': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'members'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'contact_type': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'exclude_from_merge': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}),
+ 'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}),
+ 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_person'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}),
+ 'merge_candidate': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_candidate_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}),
+ 'merge_exclusion': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_exclusion_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}),
+ 'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
+ 'person_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.PersonType']", 'symmetrical': 'False'}),
+ 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'raw_name': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'surname': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'})
+ },
+ 'ishtar_common.persontype': {
+ 'Meta': {'ordering': "('label',)", 'object_name': 'PersonType'},
+ 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ 'ishtar_common.regexp': {
+ 'Meta': {'object_name': 'Regexp'},
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'regexp': ('django.db.models.fields.CharField', [], {'max_length': '500'})
+ },
+ 'ishtar_common.sourcetype': {
+ 'Meta': {'object_name': 'SourceType'},
+ 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ 'ishtar_common.state': {
+ 'Meta': {'ordering': "['number']", 'object_name': 'State'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
+ 'number': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '3'})
+ },
+ 'ishtar_common.supporttype': {
+ 'Meta': {'object_name': 'SupportType'},
+ 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ 'ishtar_common.targetkey': {
+ 'Meta': {'unique_together': "(('target', 'key', 'associated_user', 'associated_import'),)", 'object_name': 'TargetKey'},
+ 'associated_import': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Import']", 'null': 'True', 'blank': 'True'}),
+ 'associated_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.IshtarUser']", 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_set': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'key': ('django.db.models.fields.TextField', [], {}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'keys'", 'to': "orm['ishtar_common.ImportTarget']"}),
+ 'value': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'})
+ },
+ '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 = ['ishtar_common'] \ No newline at end of file
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 2a12edc02..9509b36a6 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -1124,11 +1124,34 @@ class Address(BaseHistorizedItem):
town = models.CharField(_(u"Town"), max_length=70, null=True, blank=True)
country = models.CharField(_(u"Country"), max_length=30, null=True,
blank=True)
+ alt_address = models.TextField(_(u"Other address: address"), null=True,
+ blank=True)
+ alt_address_complement = models.TextField(
+ _(u"Other address: address complement"), null=True, blank=True)
+ alt_postal_code = models.CharField(_(u"Other address: postal code"),
+ max_length=10, null=True, blank=True)
+ alt_town = models.CharField(_(u"Other address: town"), max_length=70,
+ null=True, blank=True)
+ alt_country = models.CharField(_(u"Other address: country"),
+ max_length=30, null=True, blank=True)
phone = models.CharField(_(u"Phone"), max_length=18, null=True, blank=True)
+ phone_desc = models.CharField(_(u"Phone description"), max_length=300,
+ null=True, blank=True)
+ phone2 = models.CharField(_(u"Phone description 2"), max_length=18,
+ null=True, blank=True)
+ phone_desc2 = models.CharField(_(u"Phone description 2"), max_length=300,
+ null=True, blank=True)
+ phone3 = models.CharField(_(u"Phone 3"), max_length=18, null=True,
+ blank=True)
+ phone_desc3 = models.CharField(_(u"Phone description 3"), max_length=300,
+ null=True, blank=True)
+ raw_phone = models.TextField(_(u"Raw phone"), blank=True, null=True)
mobile_phone = models.CharField(_(u"Mobile phone"), max_length=18,
null=True, blank=True)
email = models.EmailField(
- _(u"Email"), max_length=75, blank=True, null=True)
+ _(u"Email"), max_length=300, blank=True, null=True)
+ alt_address_is_prefered = models.BooleanField(
+ _(u"Alternative address is prefered"), default=False)
history = HistoricalRecords()
class Meta:
@@ -1146,19 +1169,24 @@ class Address(BaseHistorizedItem):
def address_lbl(self):
lbl = u''
- if self.address:
- lbl += self.address
- if self.address_complement:
+ prefix = ''
+ if self.alt_address_is_prefered:
+ prefix = 'alt_'
+ if getattr(self, prefix + 'address'):
+ lbl += getattr(self, prefix + 'address')
+ if getattr(self, prefix + 'address_complement'):
if lbl:
lbl += "\n"
- lbl += self.address_complement
- if self.postal_code or self.town:
+ lbl += getattr(self, prefix + 'address_complement')
+ postal_code = getattr(self, prefix + 'postal_code')
+ town = getattr(self, prefix + 'town')
+ if postal_code or town:
if lbl:
lbl += "\n"
lbl += u"{}{}{}".format(
- self.postal_code or '',
- " " if self.postal_code and self.town else '',
- self.town or '')
+ postal_code or '',
+ " " if postal_code and town else '',
+ town or '')
if self.phone:
if lbl:
lbl += u"\n"
@@ -1248,6 +1276,8 @@ IMPORTER_CLASSES.update({
def get_importer_models():
MODELS = [
+ ('ishtar_common.models.Person', _(u"Person")),
+ ('ishtar_common.models.Organization', _(u"Organization")),
('archaeological_operations.models.Operation', _(u"Operation")),
('archaeological_operations.models.ArchaeologicalSite',
_(u"Archaeological site")),
@@ -1258,7 +1288,9 @@ def get_importer_models():
MODELS = [('archaeological_files.models.File',
_(u"Archaeological files"))] + MODELS
MODELS = [('archaeological_context_records.models.ContextRecord',
- _(u"Context records")), ] + MODELS
+ _(u"Context records")),
+ ('archaeological_context_records.models.RecordRelations',
+ _(u"Context record relations"))] + MODELS
MODELS = [('archaeological_finds.models.BaseFind',
_(u"Finds")), ] + MODELS
return MODELS
@@ -1653,6 +1685,8 @@ TARGET_MODELS = [
('archaeological_finds.models.ObjectType', _(u"Object type")),
('archaeological_context_records.models.IdentificationType',
_("Identification type")),
+ ('archaeological_context_records.models.RelationType',
+ _(u"Context record relation type")),
('SupportType', _(u"Support type")),
]
@@ -1952,7 +1986,7 @@ pre_delete.connect(pre_delete_import, sender=Import)
class Organization(Address, Merge, OwnPerms, ValueGetter):
TABLE_COLS = ('name', 'organization_type',)
- name = models.CharField(_(u"Name"), max_length=300)
+ name = models.CharField(_(u"Name"), max_length=500)
organization_type = models.ForeignKey(OrganizationType,
verbose_name=_(u"Type"))
history = HistoricalRecords()
@@ -2022,6 +2056,8 @@ class Person(Address, Merge, OwnPerms, ValueGetter):
)
TABLE_COLS = ('name', 'surname', 'raw_name', 'email', 'person_types_list',
'attached_to')
+ SHOW_URL = 'show-person'
+ MODIFY_URL = 'person_modify'
title = models.CharField(_(u"Title"), max_length=100, choices=TYPE,
blank=True, null=True)
surname = models.CharField(_(u"Surname"), max_length=50, blank=True,
@@ -2030,6 +2066,9 @@ class Person(Address, Merge, OwnPerms, ValueGetter):
null=True)
raw_name = models.CharField(_(u"Raw name"), max_length=300, blank=True,
null=True)
+ contact_type = models.CharField(_(u"Contact type"), max_length=300,
+ blank=True, null=True)
+ comment = models.TextField(_(u"Comment"), blank=True, null=True)
person_types = models.ManyToManyField(PersonType, verbose_name=_(u"Types"))
attached_to = models.ForeignKey(
'Organization', related_name='members', on_delete=models.SET_NULL,
@@ -2199,7 +2238,7 @@ class IshtarUser(User):
def full_label(self):
return self.person.full_label()
- def has_perm(self, perm, model=None, session=None):
+ def has_perm(self, perm, model=None, session=None, obj=None):
if not session:
return super(IshtarUser, self).has_perm(perm, model)
cache_key = 'usersession-{}-{}'.format(session.session_key, perm,
@@ -2207,7 +2246,7 @@ class IshtarUser(User):
res = cache.get(cache_key)
if res in (True, False):
return res
- res = super(IshtarUser, self).has_perm(perm, model)
+ res = super(IshtarUser, self).has_perm(perm, obj)
cache.set(cache_key, res, settings.CACHE_SMALLTIMEOUT)
return res
diff --git a/ishtar_common/static/media/style.css b/ishtar_common/static/media/style.css
index 4467a0639..1590c1738 100644
--- a/ishtar_common/static/media/style.css
+++ b/ishtar_common/static/media/style.css
@@ -57,6 +57,12 @@ div.form {
border-bottom:1px solid #D14;
}
+hr.spacer{
+ clear:both;
+ border:0;
+ margin: 13px;
+}
+
/* shadows */
#progress-content,
.sheet{
@@ -1103,3 +1109,31 @@ a.remove{
background-image: none;
}
+table.table-form{
+ background: #fff;
+ border-collapse: collapse;
+ text-align: center;
+ padding: 10px 8px;
+}
+
+#window table.table-form{
+ margin: 10px 80px;
+}
+
+table.table-form th {
+ text-align: center;
+ font-weight: normal;
+ padding: 8px 6px;
+ color: #922;
+ border-bottom: 2px solid #922;
+}
+
+table.table-form td {
+ text-align: center;
+ color: #666;
+ padding: 6px 15px;
+}
+
+table.table-form td input{
+ border-color:#922;
+}
diff --git a/ishtar_common/templates/blocks/table_field.html b/ishtar_common/templates/blocks/table_field.html
new file mode 100644
index 000000000..97d63ef46
--- /dev/null
+++ b/ishtar_common/templates/blocks/table_field.html
@@ -0,0 +1,4 @@
+ <tr{% if required %} class='required'{% endif %}>
+ <th>{% if label %}{{label}}{% else %}{{ field.label_tag }}{% endif %}</th>
+ <td> {{ field.errors }}{{field|safe}}</td>
+ </tr>
diff --git a/ishtar_common/templates/ishtar/blocks/modify_toolbar.html b/ishtar_common/templates/ishtar/blocks/modify_toolbar.html
new file mode 100644
index 000000000..6f8cc7584
--- /dev/null
+++ b/ishtar_common/templates/ishtar/blocks/modify_toolbar.html
@@ -0,0 +1 @@
+{% load i18n link_to_window %}{% if item %}<div class='tool modify'><a href='{{item|link_to_modify}}'>{% trans "Modify" %}</a></div>{% endif %}
diff --git a/ishtar_common/templates/ishtar/sheet.html b/ishtar_common/templates/ishtar/sheet.html
index 1302e4637..714bfa762 100644
--- a/ishtar_common/templates/ishtar/sheet.html
+++ b/ishtar_common/templates/ishtar/sheet.html
@@ -44,6 +44,7 @@ jQuery(document).ready(function(){
});
</script>
{% endblock %}
+{% block header_title %}{% endblock %}
<div class="body">
{% block toolbar %}{% endblock %}
{% block content %}
diff --git a/ishtar_common/templates/ishtar/sheet_person.html b/ishtar_common/templates/ishtar/sheet_person.html
index 796fe2c4a..f63bbc588 100644
--- a/ishtar_common/templates/ishtar/sheet_person.html
+++ b/ishtar_common/templates/ishtar/sheet_person.html
@@ -1,13 +1,11 @@
{% extends "ishtar/sheet.html" %}
{% load i18n window_field window_tables %}
-{% block head_sheet %}
-{{block.super}}
-<h1>{% trans "Person"%}</h1>
-{% endblock %}
+{% block header_title %}<h1>{% trans "Person"%}</h1>{% endblock %}
+{% block toolbar %}{% include "ishtar/sheet_toolbar.html" %}{% endblock %}
{% block content %}
-<div class='tool'>{%trans "Export as:"%} <a href='{% url show-person item.pk "odt" %}'>{%trans "OpenOffice.org file"%}</a>, <a href='{% url show-person item.pk "pdf" %}'>{%trans "PDF file"%}</a></div>
+<h3>{% trans "Identity" %}</h3>
{% field "Name" item.name %}
{% field "Surname" item.surname %}
@@ -15,12 +13,49 @@
{% field "Created by" item.history_creator.ishtaruser.full_label %}
{% field "Email" item.email %}
{% field "Type(s)" item.person_types_list %}
+
+{% if item.phone or item.phone2 or item.phone3 or item.mobile_phone %}
+<table class='formset table-form'>
+ <caption>{% trans "Phone" %}</caption>
+ <tr>
+ <th>{% trans "Phone type" %}</th>
+ <th>{% trans "Number" %}</th>
+ </tr>
+ {% if item.phone or item.phone_desc %}<tr>
+ <td>{% if item.phone_desc %}{{item.phone_desc}}{% else %}&ndash;{% endif %}</td>
+ <td>{% if item.phone %}{{item.phone}}{% else %}&ndash;{% endif %}</td>
+ </tr>{% endif %}
+ {% if item.phone2 or item.phone_desc2 %}<tr>
+ <td>{% if item.phone_desc2 %}{{item.phone_desc2}}{% else %}&ndash;{% endif %}</td>
+ <td>{% if item.phone2 %}{{item.phone2}}{% else %}&ndash;{% endif %}</td>
+ </tr>{% endif %}
+ {% if item.phone3 or item.phone_desc3 %}<tr>
+ <td>{% if item.phone_desc3 %}{{item.phone_desc3}}{% else %}&ndash;{% endif %}</td>
+ <td>{% if item.phone3 %}{{item.phone3}}{% else %}&ndash;{% endif %}</td>
+ </tr>{% endif %}
+ {% if item.mobile_phone %}<tr>
+ <td>{% trans "Mobile phone" %}</td>
+ <td>{{item.mobile_phone}}</td>
+ </tr>{% endif %}
+</table>
+{% endif %}
+
+{% if item.address or item.postal_code or item.town %}
+<h3>{% trans "Business address" %}</h3>
{% field "Address" item.address %}
{% field "Address complement" item.address_complement %}
{% field "Postal code" item.postal_code %}
{% field "Town" item.town %}
-{% field "Phone" item.phone %}
-{% field "Mobile phone" item.mobile_phone %}
+{% endif %}
+
+{% if item.alt_address or item.alt_postal_code or item.alt_town %}
+<h3>{% trans "Other address" %}</h3>
+{% field "Address" item.alt_address %}
+{% field "Address complement" item.alt_address_complement %}
+{% field "Postal code" item.alt_postal_code %}
+{% field "Town" item.alt_town %}
+{% endif %}
+
{% if item.attached_to %}<h3>{% trans "Associated organization"%}</h3>
{% field "Name" item.attached_to %}
diff --git a/ishtar_common/templates/ishtar/sheet_toolbar.html b/ishtar_common/templates/ishtar/sheet_toolbar.html
index 2e059781e..7e2c1659a 100644
--- a/ishtar_common/templates/ishtar/sheet_toolbar.html
+++ b/ishtar_common/templates/ishtar/sheet_toolbar.html
@@ -1,2 +1,2 @@
{% load i18n link_to_window %}<div class='tool'>{%trans "Export as:"%} <a href='{{item|link_to_odt}}'>{%trans "OpenOffice.org file"%}</a>, <a href='{{item|link_to_pdf}}'>{%trans "PDF file"%}</a></div>
-
+{% modify_toolbar item "person_modification" %}
diff --git a/ishtar_common/templates/ishtar/wizard/default_wizard.html b/ishtar_common/templates/ishtar/wizard/default_wizard.html
index 1a17cf32b..6491b7a0f 100644
--- a/ishtar_common/templates/ishtar/wizard/default_wizard.html
+++ b/ishtar_common/templates/ishtar/wizard/default_wizard.html
@@ -24,6 +24,7 @@
<div class='form'>
{{ wizard.form.media }}
{{ wizard.management_form }}
+{% block form_detail %}
{% if wizard.form.forms %}
{{ wizard.form.management_form }}
<div class='top_button'><input type="submit" id="submit_form" value="{% trans "Validate" %}"/></div>
@@ -39,6 +40,7 @@
{% table_form wizard.form %}
{% if not is_search %}</table>{% endif %}
{% endif %}
+{% endblock %}
<input type="hidden" name="{{ step_field }}" value="{{ step0 }}" />
{{ previous_fields|safe }}
{% block "validation_bar" %}
diff --git a/ishtar_common/templates/ishtar/wizard/wizard_person.html b/ishtar_common/templates/ishtar/wizard/wizard_person.html
new file mode 100644
index 000000000..85bbfc75e
--- /dev/null
+++ b/ishtar_common/templates/ishtar/wizard/wizard_person.html
@@ -0,0 +1,59 @@
+{% extends "ishtar/wizard/default_wizard.html" %}
+{% load i18n range table_form %}
+{% block form_detail %}
+
+<table class='formset'>
+ <caption>{% trans "Identity" %}</caption>
+ {% table_field wizard.form.title %}
+ {% table_field wizard.form.surname 1 %}
+ {% table_field wizard.form.name 1 %}
+ {% table_field wizard.form.raw_name %}
+ {% table_field wizard.form.email %}
+ {% table_field wizard.form.attached_to %}
+</table>
+
+<hr class='spacer'/>
+<table class='formset table-form'>
+ <caption>{% trans "Phone" %}</caption>
+ <tr>
+ <th>{% trans "Phone type" %}</th>
+ <th>{% trans "Number" %}</th>
+ </tr>
+ <tr>
+ <td>{{ wizard.form.phone_desc.errors }}{{wizard.form.phone_desc|safe}}</td>
+ <td>{{ wizard.form.phone.errors }}{{wizard.form.phone|safe}}</td>
+ </tr>
+ <tr>
+ <td>{{ wizard.form.phone_desc2.errors }}{{wizard.form.phone_desc2|safe}}</td>
+ <td>{{ wizard.form.phone2.errors }}{{wizard.form.phone2|safe}}</td>
+ </tr>
+ <tr>
+ <td>{{ wizard.form.phone_desc3.errors }}{{wizard.form.phone_desc3|safe}}</td>
+ <td>{{ wizard.form.phone3.errors }}{{wizard.form.phone3|safe}}</td>
+ </tr>
+ <tr>
+ <td>{% trans "Mobile phone" %}</td>
+ <td>{{ wizard.form.mobile_phone.errors }}{{wizard.form.mobile_phone|safe}}</td>
+ </tr>
+</table>
+<hr class='spacer'/>
+
+<table class='formset'>
+ <caption>{% trans "Business address" %}</caption>
+ {% table_field wizard.form.address %}
+ {% table_field wizard.form.address_complement %}
+ {% table_field wizard.form.postal_code %}
+ {% table_field wizard.form.town %}
+ {% table_field wizard.form.country %}
+</table>
+<hr class='spacer'/>
+<table class='formset'>
+ <caption>{% trans "Other address" %}</caption>
+ {% table_field wizard.form.alt_address 0 'Address' %}
+ {% table_field wizard.form.alt_address_complement 0 'Address complement' %}
+ {% table_field wizard.form.alt_postal_code 0 'Postal code' %}
+ {% table_field wizard.form.alt_town 0 'Town' %}
+ {% table_field wizard.form.alt_country 0 'Country' %}
+</table>
+
+{% endblock %}
diff --git a/ishtar_common/templatetags/link_to_window.py b/ishtar_common/templatetags/link_to_window.py
index 65e8b23ca..5ff928bb1 100644
--- a/ishtar_common/templatetags/link_to_window.py
+++ b/ishtar_common/templatetags/link_to_window.py
@@ -24,3 +24,25 @@ def link_to_odt(item):
@register.filter
def link_to_pdf(item):
return reverse(item.SHOW_URL, args=[item.pk, 'pdf'])
+
+
+@register.filter
+def link_to_modify(item):
+ if not hasattr(item, 'MODIFY_URL') or not item:
+ return ""
+ return reverse(item.MODIFY_URL, args=[item.pk])
+
+
+@register.inclusion_tag('ishtar/blocks/modify_toolbar.html',
+ takes_context=True)
+def modify_toolbar(context, item, action):
+ request = context.get('request')
+ items_by_idx = request.session['MENU'].items_by_idx.keys()
+ if action not in items_by_idx:
+ return {}
+ menu = request.session['MENU'].items_by_idx[action]
+ user = request.user
+ if not hasattr(user, 'ishtaruser') or \
+ not menu.is_available(user.ishtaruser, item):
+ return {}
+ return {'item': item}
diff --git a/ishtar_common/templatetags/table_form.py b/ishtar_common/templatetags/table_form.py
index 6ee99b9a5..596301f89 100644
--- a/ishtar_common/templatetags/table_form.py
+++ b/ishtar_common/templatetags/table_form.py
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
from django.template import Library
+from django.utils.translation import ugettext_lazy as _
register = Library()
@@ -9,3 +10,10 @@ register = Library()
@register.inclusion_tag('blocks/form_snippet.html')
def table_form(form):
return {'form': form}
+
+
+@register.inclusion_tag('blocks/table_field.html')
+def table_field(field, required=False, label=None):
+ if label:
+ label = _(label)
+ return {'field': field, 'required': required, 'label': label}
diff --git a/ishtar_common/urls.py b/ishtar_common/urls.py
index 036494354..a3bcaffb5 100644
--- a/ishtar_common/urls.py
+++ b/ishtar_common/urls.py
@@ -43,6 +43,8 @@ urlpatterns = patterns(
url(r'person_modification/(?P<step>.+)?$',
check_rights(['change_person', 'change_own_person'])(
views.person_modification_wizard), name='person_modification'),
+ url(r'person_modify/(?P<pk>.+)/$', views.person_modify,
+ name='person_modify'),
url(r'person_deletion/(?P<step>.+)?$',
check_rights(['change_person', 'change_own_person'])(
views.person_deletion_wizard), name='person_deletion'),
diff --git a/ishtar_common/views.py b/ishtar_common/views.py
index 54eb9164f..296d56648 100644
--- a/ishtar_common/views.py
+++ b/ishtar_common/views.py
@@ -103,6 +103,15 @@ person_modification_wizard = wizards.PersonModifWizard.as_view(
label=_(u"Person modification"),
url_name='person_modification')
+
+def person_modify(request, pk):
+ person_modification_wizard(request)
+ wizards.PersonModifWizard.session_set_value(
+ request, 'selec-person_modification', 'pk', pk, reset=True)
+ return redirect(reverse('person_modification',
+ kwargs={'step': 'identity-person_modification'}))
+
+
person_deletion_wizard = wizards.PersonDeletionWizard.as_view(
[('selec-person_deletion', forms.PersonFormSelection),
('final-person_deletion', FinalDeleteForm)],
diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py
index 0b121fd76..e974942b7 100644
--- a/ishtar_common/wizards.py
+++ b/ishtar_common/wizards.py
@@ -1112,10 +1112,14 @@ class ClosingWizard(Wizard):
class PersonWizard(Wizard):
model = models.Person
+ wizard_templates = {
+ 'identity-person_creation': "ishtar/wizard/wizard_person.html"}
class PersonModifWizard(PersonWizard):
modification = True
+ wizard_templates = {
+ 'identity-person_modification': "ishtar/wizard/wizard_person.html"}
class PersonDeletionWizard(DeletionWizard):