diff --git a/koalixcrm/crm/admin.py b/koalixcrm/crm/admin.py index 6be9ad27..21557884 100644 --- a/koalixcrm/crm/admin.py +++ b/koalixcrm/crm/admin.py @@ -20,7 +20,8 @@ from koalixcrm.crm.contact.customergroup import CustomerGroup, OptionCustomerGroup from koalixcrm.crm.contact.customerbillingcycle import CustomerBillingCycle, OptionCustomerBillingCycle from koalixcrm.crm.contact.person import Person -from koalixcrm.crm.contact.contact import CallForContact, OptionCall, OptionPerson, ContactImportData +from koalixcrm.crm.contact.contact import CallForContact, OptionCall, OptionPerson +from koalixcrm.crm.contact.data_import import ContactImportData from koalixcrm.crm.forms import ImportDataContactForm class ContactImportDataAdmin(admin.ModelAdmin): diff --git a/koalixcrm/crm/contact/data_import.py b/koalixcrm/crm/contact/data_import.py index cbe0de2a..bf0e9dfa 100644 --- a/koalixcrm/crm/contact/data_import.py +++ b/koalixcrm/crm/contact/data_import.py @@ -1,3 +1,7 @@ +from django.db import models +from django.utils.translation import ugettext as _ +from koalixcrm.crm.const.purpose import * + class ContactImportData(models.Model): data_file = models.FileField(upload_to='data_files', max_length=255) diff --git a/koalixcrm/crm/management/commands/importcontactdata.py b/koalixcrm/crm/management/commands/importcontactdata.py index 44695a23..c66d34f3 100644 --- a/koalixcrm/crm/management/commands/importcontactdata.py +++ b/koalixcrm/crm/management/commands/importcontactdata.py @@ -43,7 +43,7 @@ def format_phone_number(self, value): res = str(value).replace(" ", "") res = re.sub(r"^[a-zA-Z]+(\d+)$", r"\1", res) res = re.sub(r"^(\d+)[a-zA-Z]+$", r"\1", res) - res = re.sub(r".0$", r"", res) + res = re.sub(r"\.0$", r"", res) return res def format_city_name(self, value): diff --git a/projectsettings/dashboard.py b/projectsettings/dashboard.py index 3fb7de17..90c3221b 100644 --- a/projectsettings/dashboard.py +++ b/projectsettings/dashboard.py @@ -49,7 +49,7 @@ def init_with_context(self, context): css_classes=('collapse closed',), models=('koalixcrm.crm.contact.contact.CallForContact', 'koalixcrm.crm.documents.visit.Visit', - 'koalixcrm.crm.contact.contact.ContactImportData'), + 'koalixcrm.crm.contact.data_import.ContactImportData'), ), modules.ModelList( _('Data Import'),