diff options
Diffstat (limited to 'archaeological_finds/models_finds.py')
-rw-r--r-- | archaeological_finds/models_finds.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 41752be0b..882bcd811 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -33,6 +33,8 @@ from django.utils.translation import ugettext_lazy as _, pgettext_lazy, \ from ishtar_common.data_importer import post_importer_action, ImporterError from ishtar_common.utils import cached_label_changed, post_save_point +from ishtar_common.alternative_configs import ALTERNATE_CONFIGS + from ishtar_common.models import Document, GeneralType, \ HierarchicalType, BaseHistorizedItem, ShortMenuItem, LightHistorizedItem, \ HistoricalRecords, OwnPerms, Person, Basket, post_save_cache, \ @@ -365,6 +367,9 @@ class BaseFind(BulkUpdatedItem, BaseHistorizedItem, OwnPerms): return settings.JOINT.join(c_id) def complete_id(self): + profile = get_current_profile() + if profile.has_overload('basefind_complete_id'): + return ALTERNATE_CONFIGS[profile.config].basefind_complete_id(self) # OPE|MAT.CODE|UE|FIND_index c_id = [self._ope_code()] @@ -385,6 +390,9 @@ class BaseFind(BulkUpdatedItem, BaseHistorizedItem, OwnPerms): return self.complete_id() def short_id(self): + profile = get_current_profile() + if profile.has_overload('basefind_short_id'): + return ALTERNATE_CONFIGS[profile.config].basefind_short_id(self) # OPE|FIND_index c_id = [self._ope_code()] c_id.append((u'{:0' + str(settings.ISHTAR_FINDS_INDEX_ZERO_LEN) + 'd}' @@ -1079,6 +1087,10 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, OwnPerms, @property def administrative_index(self): + profile = get_current_profile() + if profile.has_overload('find_administrative_index'): + return ALTERNATE_CONFIGS[profile.config].find_administrative_index( + self) bf = self.get_first_base_find() if not bf or not bf.context_record or not bf.context_record.operation: return "" |