diff --git a/CHANGELOG b/CHANGELOG index 4b2bd3870d..416328d750 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Remove workflow * Improve contextual menu: - Actions for all relation fields on list view - Use icons diff --git a/tryton/gui/window/view_form/view/form.py b/tryton/gui/window/view_form/view/form.py index 976e369a5b..109072c3b4 100644 --- a/tryton/gui/window/view_form/view/form.py +++ b/tryton/gui/window/view_form/view/form.py @@ -171,16 +171,9 @@ class ViewForm(ParserView): 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') context = record.context_get() - if button_type == 'workflow': - try: - RPCExecute('model', self.screen.model_name, - 'workflow_trigger_validate', record_id, - attrs['name'], context=context) - except RPCException: - pass - elif button_type == 'object': + if button_type == 'object': try: RPCExecute('model', self.screen.model_name, attrs['name'], [record_id], context=context) diff --git a/tryton/gui/window/view_form/view/list_gtk/parser.py b/tryton/gui/window/view_form/view/list_gtk/parser.py index 5cc4966af3..048fbc671c 100644 --- a/tryton/gui/window/view_form/view/list_gtk/parser.py +++ b/tryton/gui/window/view_form/view/list_gtk/parser.py @@ -992,16 +992,9 @@ class Button(object): 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 = record.context_get() - if button_type == 'workflow': - try: - RPCExecute('model', self.screen.model_name, - 'workflow_trigger_validate', obj_id, - self.attrs['name'], context=ctx) - except RPCException: - pass - elif button_type == 'object': + if button_type == 'object': try: RPCExecute('model', self.screen.model_name, self.attrs['name'], [obj_id], context=ctx) diff --git a/tryton/plugins/workflow/__init__.py b/tryton/plugins/workflow/__init__.py deleted file mode 100644 index db0660d763..0000000000 --- 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), - ]