summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorAntony Lesuisse <al@openerp.com>2012-09-13 21:27:59 +0200
committerAntony Lesuisse <al@openerp.com>2012-09-13 21:27:59 +0200
commit56429967c2dee9e8d10a331244ae89710b6b9700 (patch)
tree462c4fe2b49183f3f784fb2a82704a6b1d0a9e6e /addons
parent9df7381ced04b44e470fe0a060b6b82773f20c84 (diff)
parent188eff46ecade0774bf40fbafbe84e31e801b4c2 (diff)
[MERGE] developper mode print workflow for nel
bzr revid: al@openerp.com-20120913192759-f1t3r9j58zwvba10
Diffstat (limited to 'addons')
-rw-r--r--addons/web/static/src/js/views.js15
-rw-r--r--addons/web/static/src/xml/base.xml1
2 files changed, 16 insertions, 0 deletions
diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js
index f5bf83c2c29..02297e9db01 100644
--- a/addons/web/static/src/js/views.js
+++ b/addons/web/static/src/js/views.js
@@ -837,6 +837,21 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({
}
});
break;
+ case 'print_workflow':
+ if (current_view.get_selected_ids && current_view.get_selected_ids().length == 1) {
+ instance.web.blockUI();
+ var action = {
+ context: { active_ids: current_view.get_selected_ids() },
+ report_name: "workflow.instance.graph",
+ datas: {
+ model: this.dataset.model,
+ id: current_view.get_selected_ids()[0],
+ nested: true,
+ }
+ };
+ this.session.get_file({ url: '/web/report', data: {action: JSON.stringify(action)}, complete: instance.web.unblockUI });
+ }
+ break;
default:
if (val) {
console.log("No debug handler for ", val);
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index 37d2dfab414..b6b89a4f1ec 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -487,6 +487,7 @@
<option t-if="view_manager.searchview" value="edit" data-model="ir.ui.view" t-att-data-id="view_manager.searchview.view_id">Edit SearchView</option>
<option t-if="view_manager.action" value="edit" t-att-data-model="view_manager.action.type" t-att-data-id="view_manager.action.id">Edit Action</option>
<option value="edit_workflow">Edit Workflow</option>
+ <option value="print_workflow">Print Workflow</option>
</t>
</t>
<t t-name="ViewManagerDebugViewLog">