src/pyams_skin/viewlet/toolbar/__init__.py
changeset 322 fde93ea7a59a
parent 220 ec15e26aad80
--- a/src/pyams_skin/viewlet/toolbar/__init__.py	Wed May 23 15:13:18 2018 +0200
+++ b/src/pyams_skin/viewlet/toolbar/__init__.py	Wed May 23 15:16:25 2018 +0200
@@ -59,7 +59,8 @@
     modal_target = FieldProperty(IToolbarAction['modal_target'])
 
     def get_url(self):
-        return absolute_url(self.context, self.request, self.url)
+        context = getattr(self.__parent__, 'actions_context', self.context)
+        return absolute_url(context, self.request, self.url)
 
 
 class JsToolbarAction(ToolbarAction):
@@ -133,7 +134,8 @@
     stop_propagation = FieldProperty(IToolbarMenuItem['stop_propagation'])
 
     def get_url(self):
-        return absolute_url(self.context, self.request, self.url)
+        context = getattr(self.__parent__, 'actions_context', self.context)
+        return absolute_url(context, self.request, self.url)
 
 
 class JsToolbarActionItem(ToolbarActionItem):