Reviewers: ,


Please review this at http://codereview.tryton.org/299001/

Affected files:
  M tryton/gui/window/view_form/view/form.py
  M tryton/gui/window/view_form/view/list_gtk/parser.py
  R tryton/plugins/workflow/__init__.py


Index: tryton/gui/window/view_form/view/form.py
===================================================================

--- a/tryton/gui/window/view_form/view/form.py
+++ b/tryton/gui/window/view_form/view/form.py
@@ -162,18 +162,10 @@
         if record_id:
             if not attrs.get('confirm', False) or \
                     common.sur(attrs['confirm']):
-                button_type = attrs.get('type', 'workflow')
+                button_type = attrs.get('type', 'object')
                 ctx = rpc.CONTEXT.copy()
                 ctx.update(record.context_get())
-                if button_type == 'workflow':
-                    args = ('model', self.screen.model_name,
-                            'workflow_trigger_validate', record_id,
-                            attrs['name'], ctx)
-                    try:
-                        rpc.execute(*args)
-                    except TrytonServerError, exception:
-                        common.process_exception(exception, *args)
-                elif button_type == 'object':
+                if button_type == 'object':
                     args = ('model', self.screen.model_name, attrs['name'],
                             [record_id], ctx)
                     try:

Index: tryton/gui/window/view_form/view/list_gtk/parser.py
===================================================================

--- a/tryton/gui/window/view_form/view/list_gtk/parser.py
+++ b/tryton/gui/window/view_form/view/list_gtk/parser.py
@@ -1005,18 +1005,10 @@
         if obj_id:
             if not self.attrs.get('confirm', False) or \
                     common.sur(self.attrs['confirm']):
-                button_type = self.attrs.get('type', 'workflow')
+                button_type = self.attrs.get('type', 'object')
                 ctx = rpc.CONTEXT.copy()
                 ctx.update(record.context_get())
-                if button_type == 'workflow':
-                    args = ('model', self.screen.model_name,
-                            'workflow_trigger_validate', obj_id,
-                            self.attrs['name'], ctx)
-                    try:
-                        rpc.execute(*args)
-                    except TrytonServerError, exception:
-                        common.process_exception(exception, *args)
-                elif button_type == 'object':
+                if button_type == 'object':
                     args = ('model', self.screen.model_name,
                             self.attrs['name'], [obj_id], ctx)
                     try:

Index: tryton/plugins/workflow/__init__.py
===================================================================
deleted file mode 100644

--- a/tryton/plugins/workflow/__init__.py
+++ /dev/null
@@ -1,27 +0,0 @@
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
-from tryton.action import Action
-import gettext
-
-_ = gettext.gettext
-
-
-def workflow_print(datas):
-    datas = datas.copy()
-    datas['nested'] = False
-    Action.exec_report('workflow.instance.graph', datas)
-    return True
-
-
-def workflow_print_complex(datas):
-    datas = datas.copy()
-    datas['nested'] = True
-    Action.exec_report('workflow.instance.graph', datas)
-    return True
-
-
-def get_plugins(model):
-    return [
-            (_('Print Workflow'), workflow_print),
-            (_('Print Workflow (Complex)'), workflow_print_complex),
-        ]



--
[email protected] mailing list

Reply via email to