From 978d18d01b0d29ffcc301a48b7e3cb0676266316 Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 24 Aug 2022 15:37:51 +1000 Subject: [PATCH] Open labels and reports in a new window (#3602) --- InvenTree/templates/js/translated/label.js | 2 +- InvenTree/templates/js/translated/report.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/InvenTree/templates/js/translated/label.js b/InvenTree/templates/js/translated/label.js index c95962e526..ad1f8e791f 100644 --- a/InvenTree/templates/js/translated/label.js +++ b/InvenTree/templates/js/translated/label.js @@ -44,7 +44,7 @@ function printLabels(url, plugin=null) { } }); } else { - window.location.href = url; + window.open(url); } } diff --git a/InvenTree/templates/js/translated/report.js b/InvenTree/templates/js/translated/report.js index eac707f804..7187674635 100644 --- a/InvenTree/templates/js/translated/report.js +++ b/InvenTree/templates/js/translated/report.js @@ -152,7 +152,7 @@ function printTestReports(items) { href += `item=${item}&`; }); - window.location.href = href; + window.open(href); } } ); @@ -205,7 +205,7 @@ function printBuildReports(builds) { href += `build=${build}&`; }); - window.location.href = href; + window.open(href); } } ); @@ -259,7 +259,7 @@ function printBomReports(parts) { href += `part=${part}&`; }); - window.location.href = href; + window.open(href); } } ); @@ -313,7 +313,7 @@ function printPurchaseOrderReports(orders) { href += `order=${order}&`; }); - window.location.href = href; + window.open(href); } } ); @@ -367,7 +367,7 @@ function printSalesOrderReports(orders) { href += `order=${order}&`; }); - window.location.href = href; + window.open(href); } } );