[PATCH 7 of 8 compound V2] Change CloneAction default category to 'mainactions'

Sylvain Thenault sylvain.thenault at logilab.fr
Fri Mar 3 09:49:06 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1488530870 -3600
#      Fri Mar 03 09:47:50 2017 +0100
# Node ID c920d5cf4dfc22df07c573bf37a7c71951edeffd
# Parent  84b9d6848eb78340105983bfb2ba858620f476d2
Change CloneAction default category to 'mainactions'

that's at least desired by current usage of CloneAction, let's suppose it's a
fine default.

diff --git a/views.py b/views.py
--- a/views.py
+++ b/views.py
@@ -41,10 +41,11 @@ class CloneAction(actions.CopyAction):
     """
     __abstract__ = True
     __select__ = (actions.CopyAction.__select__ & one_line_rset()
                   & has_permission('add')
                   & adaptable('IClonable'))
+    category = 'mainactions'
     title = _('clone')
 
     def url(self):
         entity = self.cw_rset.get_entity(self.cw_row or 0, self.cw_col or 0)
         return entity.absolute_url(vid='copy', **linkto_clone_url_params(entity))


More information about the saem-devel mailing list