Skip to content

Commit

Permalink
[FIX] Fix the javascript calls
Browse files Browse the repository at this point in the history
  • Loading branch information
gdgellatly committed Dec 14, 2017
1 parent 506debb commit 9e02139
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions base_report_to_printer/static/src/js/qweb_action_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,26 @@ odoo.define('base_report_to_printer.print', function (require) {
var framework = require('web.framework');
var rpc = require('web.rpc');


ActionManager.include({
ir_actions_report: function (action, options) {
var action_val = _.clone(action);
var _t = core._t;
var self = this;
var _super = this._super;

if ('report_type' in action_val && action_val.report_type === 'qweb-pdf') {
if (action_val.report_type === 'qweb-pdf') {
framework.blockUI();
rpc.query({
model: 'ir.actions.report',
method: 'print_action_for_report_name',
args: [action_val.report_name]
}).then(function (print_action) {
if (print_action && print_action.action_val === 'server') {
if (print_action && print_action.action === 'server') {
framework.unblockUI();
rpc.query({
model: 'ir.actions.report',
method: 'print_document',
args: [action_val.context.active_ids, action_val.report_name],
args: [action_val.id, action_val.context.active_ids],
kwargs: {data: action_val.data || {}},
context: action_val.context || {}
}).then(function () {
Expand Down

0 comments on commit 9e02139

Please sign in to comment.