diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js index 6fc837333b6..ca702917d1d 100644 --- a/addons/web/static/src/js/coresetup.js +++ b/addons/web/static/src/js/coresetup.js @@ -283,6 +283,16 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess CHECK_INTERVAL = 1000, id = _.uniqueId('get_file_frame'), remove_form = false; + + // iOS devices doesn't allow iframe use the way we do it, + // opening a new window seems the best way to workaround + if (navigator.userAgent.match(/(iPod|iPhone|iPad)/) || true) { + var params = _.extend({}, options.data || {}, {token: token}); + var url = this.url(options.url, params); + instance.web.unblockUI(); + return window.open(url); + } + var $form, $form_data = $('
'); var complete = function () { diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index f9050369a83..21ff627c544 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -470,6 +470,20 @@ instance.web.ActionManager = instance.web.Widget.extend({ }).then(function(res) { action = _.clone(action); action.context = res.context; + + // iOS devices doesn't allow iframe use the way we do it, + // opening a new window seems the best way to workaround + if (navigator.userAgent.match(/(iPod|iPhone|iPad)/)) { + var params = { + action: JSON.stringify(action), + token: new Date().getTime() + } + var url = self.session.url('/web/report', params) + instance.web.unblockUI(); + $('')[0].click(); + return; + } + var c = instance.webclient.crashmanager; return $.Deferred(function (d) { self.session.get_file({