summaryrefslogtreecommitdiff
path: root/archaeological_finds/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2015-10-06 14:49:10 +0200
committerÉtienne Loks <etienne.loks@proxience.com>2015-10-06 14:49:10 +0200
commitcba608462d4f03a8ca48f1e7a912e833682a21e8 (patch)
tree7db35133da25a55cfe1183260953aab882255309 /archaeological_finds/models.py
parent12b517daa7aca2ca475a654ecca99202ecbe9f23 (diff)
downloadIshtar-cba608462d4f03a8ca48f1e7a912e833682a21e8.tar.bz2
Ishtar-cba608462d4f03a8ca48f1e7a912e833682a21e8.zip
Grids: manage multiple values in the same column
Diffstat (limited to 'archaeological_finds/models.py')
-rw-r--r--archaeological_finds/models.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/archaeological_finds/models.py b/archaeological_finds/models.py
index 03e54b8f2..1d59c59b1 100644
--- a/archaeological_finds/models.py
+++ b/archaeological_finds/models.py
@@ -213,6 +213,31 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem):
if settings.COUNTRY == 'fr':
TABLE_COLS.insert(
6, 'base_finds.context_record.operation.code_patriarche')
+ if settings.COUNTRY == 'fr':
+ TABLE_COLS_FOR_OPE = [
+ ['base_finds.context_record.operation.code_patriarche', ],
+ ['base_finds.context_record.operation.code_patriarche', ],
+ ]
+ else:
+ TABLE_COLS_FOR_OPE = [
+ ['base_finds.context_record.operation.year',
+ 'base_finds.context_record.operation.operation_code'],
+ ['base_finds.context_record.operation.year',
+ 'base_finds.context_record.operation.operation_code']
+ ]
+ TABLE_COLS_FOR_OPE[0] += ['index']
+ TABLE_COLS_FOR_OPE[1] += [
+ 'material_types.code',
+ 'base_finds.context_record.label',
+ 'index']
+ TABLE_COLS_FOR_OPE += [
+ 'previous_id', 'label', 'material_types',
+ 'dating.period', 'find_number', 'object_types',
+ 'description']
+
+ TABLE_COLS_FOR_OPE_LBL = {
+ 'code_patriarche__index': _("Short Id"),
+ 'code_patriarche__code__label__index': _("Complete ID")}
base_finds = models.ManyToManyField(BaseFind, verbose_name=_(u"Base find"),
related_name='find')
external_id = models.CharField(_(u"External ID"), blank=True, null=True,