diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-12-02 14:15:05 +0100 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-12-02 14:15:05 +0100 |
| commit | 3c3dc92e3aef6c479b0d5f020c7dc8c4ce76e532 (patch) | |
| tree | 5d4355bb39ea5de6aeaf442d07cf91fcbfa85ebd /archaeological_finds/models_finds.py | |
| parent | f832138b10e557fc8d4086fcdb7f1383516ccfde (diff) | |
| download | Ishtar-3c3dc92e3aef6c479b0d5f020c7dc8c4ce76e532.tar.bz2 Ishtar-3c3dc92e3aef6c479b0d5f020c7dc8c4ce76e532.zip | |
Sheet quick actions to add treatments from find, basket and container
Diffstat (limited to 'archaeological_finds/models_finds.py')
| -rw-r--r-- | archaeological_finds/models_finds.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 5dc8abc98..ee6253109 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -616,6 +616,12 @@ class FindBasket(Basket, MainItem): _(u"Manage basket"), "fa fa-shopping-basket", "", "", False), ] + can_edit_find = self.can_do(request, 'change_find') + if can_edit_find: + actions += [ + (reverse('findbasket-add-treatment', args=[self.pk]), + _(u"Add treatment"), "fa fa-exchange", "", "", False), + ] duplicate = self.QUICK_ACTIONS[0] actions += [ @@ -1237,6 +1243,8 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, OwnPerms, (reverse("find-qa-basket", args=[self.pk]), _(u"Add to basket"), "fa fa-shopping-basket", "", "", True), + (reverse('find-add-treatment', args=[self.pk]), + _(u"Add treatment"), "fa fa-exchange", "", "", False), ] if get_current_profile().warehouse: actions.append( |
