summaryrefslogtreecommitdiff
path: root/ishtar_common/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-03-07 17:34:18 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-03-07 17:34:18 +0100
commit9d8ef84d18eddcadf0398a42c3606333d0c89d6a (patch)
tree0b5681eb64aca8616670ac6e03b0b64851b66880 /ishtar_common/models.py
parent70bf74767fccbe6cbdf4592759b31ddd5bb7d9c3 (diff)
downloadIshtar-9d8ef84d18eddcadf0398a42c3606333d0c89d6a.tar.bz2
Ishtar-9d8ef84d18eddcadf0398a42c3606333d0c89d6a.zip
Exports: specific configuration to manage ambiguous column (refs #3446)
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r--ishtar_common/models.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 53f0871f5..5b21a9a49 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -1831,6 +1831,9 @@ class ImporterType(models.Model):
for field in column.duplicate_fields.all()]
formater_kwargs['required'] = column.required
formater_kwargs['force_new'] = force_news
+ if column.export_field_name:
+ formater_kwargs['export_field_name'] = [
+ column.export_field_name]
formater = ImportFormater(targets, formater_types,
**formater_kwargs)
LINE_FORMAT.append(formater)
@@ -1952,6 +1955,11 @@ class ImporterColumn(models.Model):
description = models.TextField(_("Description"), blank=True, null=True)
regexp_pre_filter = models.ForeignKey("Regexp", blank=True, null=True)
required = models.BooleanField(_(u"Required"), default=False)
+ export_field_name = models.CharField(
+ _(u"Export field name"), blank=True, null=True, max_length=200,
+ help_text=_(u"Fill this field if the field name is ambiguous for "
+ u"export. For instance: concatenated fields.")
+ )
class Meta:
verbose_name = _(u"Importer - Column")