summaryrefslogtreecommitdiff
path: root/archaeological_finds/models_finds.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_finds/models_finds.py')
-rw-r--r--archaeological_finds/models_finds.py22
1 files changed, 20 insertions, 2 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py
index 1ef9d5846..0911317f2 100644
--- a/archaeological_finds/models_finds.py
+++ b/archaeological_finds/models_finds.py
@@ -39,7 +39,7 @@ from ishtar_common.models import Document, GeneralType, \
HierarchicalType, BaseHistorizedItem, ShortMenuItem, LightHistorizedItem, \
HistoricalRecords, OwnPerms, Person, Basket, post_save_cache, \
ValueGetter, get_current_profile, IshtarSiteProfile, PRIVATE_FIELDS, \
- SpatialReferenceSystem, BulkUpdatedItem, ExternalIdManager
+ SpatialReferenceSystem, BulkUpdatedItem, ExternalIdManager, QuickAction
from archaeological_operations.models import AdministrativeAct, Operation
from archaeological_context_records.models import ContextRecord, Dating
@@ -605,7 +605,7 @@ class FBulkView(object):
class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, OwnPerms,
- ShortMenuItem):
+ MainItem):
EXTERNAL_ID_KEY = 'find_external_id'
SHOW_URL = 'show-find'
SLUG = 'find'
@@ -878,6 +878,24 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, OwnPerms,
"remarkabilities__label", "material_types__label"]
objects = ExternalIdManager()
+ QA_EDIT = QuickAction(
+ url="find-qa-bulk-update", icon_class="fa fa-pencil",
+ text=_(u"Bulk update"), target="many",
+ rights=['change_find', 'change_own_find'])
+
+ QUICK_ACTIONS = [
+ QA_EDIT,
+ QuickAction(
+ url="find-qa-packaging", icon_class="fa fa-gift",
+ text=_(u"Packaging"), target="many", rights=['change_warehouse'],
+ module='warehouse'
+ ),
+ QuickAction(
+ url="find-qa-basket", icon_class="fa fa-shopping-basket",
+ text=_(u"Basket"), target="many",
+ rights=['change_find', 'change_own_find']),
+ ]
+
# fields
base_finds = models.ManyToManyField(BaseFind, verbose_name=_(u"Base find"),
related_name='find')