diff options
Diffstat (limited to 'archaeological_context_records/models.py')
| -rw-r--r-- | archaeological_context_records/models.py | 14 | 
1 files changed, 11 insertions, 3 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index 875a48019..dc8409b39 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -33,14 +33,13 @@ from django.utils.text import slugify  from ishtar_common.utils import cached_label_changed, \      m2m_historization_changed, post_save_geo -from ishtar_common.model_managers import ExternalIdManager  from ishtar_common.models import Document, GeneralType, \      BaseHistorizedItem, HistoricalRecords, OwnPerms, ShortMenuItem, \      GeneralRelationType, GeneralRecordRelations, post_delete_record_relation,\      post_save_cache, ValueGetter, BulkUpdatedItem, \      RelationItem, Town, get_current_profile, document_attached_changed, \      HistoryModel, SearchAltName, GeoItem, QRCodeItem, SearchVectorConfig, \ -    DocumentItem +    DocumentItem, MainItem, QuickAction  from archaeological_operations.models import Operation, Period, Parcel, \      ArchaeologicalSite  from ishtar_common.model_managers import UUIDModelManager @@ -292,7 +291,7 @@ class CRBulkView(object):  class ContextRecord(BulkUpdatedItem, DocumentItem, BaseHistorizedItem, -                    QRCodeItem, GeoItem, OwnPerms, ValueGetter, ShortMenuItem, +                    QRCodeItem, GeoItem, OwnPerms, ValueGetter, MainItem,                      RelationItem):      SLUG = 'contextrecord'      APP = "archaeological-context-records" @@ -452,6 +451,15 @@ class ContextRecord(BulkUpdatedItem, DocumentItem, BaseHistorizedItem,                       "cached_related_context_records"]      DOWN_MODEL_UPDATE = ["base_finds"] +    QA_LOCK = QuickAction( +        url="contextrecord-qa-lock", icon_class="fa fa-lock", +        text=_(u"Lock/Unlock"), target="many", +        rights=['change_contextrecord', 'change_own_contextrecord'] +    ) +    QUICK_ACTIONS = [ +        QA_LOCK +    ] +      history = HistoricalRecords(bases=[HistoryModel])      objects = UUIDModelManager()  | 
