From 2949138a7d84cd6c925ea1745d62f25ef077bb8b Mon Sep 17 00:00:00 2001
From: Christophe Monniez
Date: Fri, 8 Jan 2021 11:18:31 +0000
Subject: [PATCH] [IMP] various: use the barcode qweb widget whenever possible
When using the route `/report/barcode/...` in a report, wkhtmltopdf
makes htpps requests on the server to retrieve the barcode image.
If a lot of barcodes have to be printed, this can overload the server
with too much requests and makes wkhtml crashes.
With this commit, the qweb barcode widget is used to include the barcode
as an img tag with inline barcode image as base64 data.
closes odoo/odoo#64211
Related: odoo/enterprise#15619
Signed-off-by: Christophe Monniez (moc)
---
.../coupon/report/coupon_report_templates.xml | 2 +-
addons/hr/report/hr_employee_badge.xml | 2 +-
.../mrp/report/mrp_production_templates.xml | 10 +++---
.../point_of_sale/views/report_userlabel.xml | 2 +-
addons/product/report/product_packaging.xml | 32 +++++++++----------
.../report/product_product_templates.xml | 8 ++---
addons/stock/report/picking_templates.xml | 6 ++--
.../stock/report/report_location_barcode.xml | 2 +-
addons/stock/report/report_lot_barcode.xml | 2 +-
.../stock/report/report_package_barcode.xml | 7 ++--
.../report/report_stockpicking_operations.xml | 10 +++---
.../report/report_picking_batch.xml | 11 +++----
12 files changed, 41 insertions(+), 53 deletions(-)
diff --git a/addons/coupon/report/coupon_report_templates.xml b/addons/coupon/report/coupon_report_templates.xml
index 6051fefdddc..1d4259ac62a 100644
--- a/addons/coupon/report/coupon_report_templates.xml
+++ b/addons/coupon/report/coupon_report_templates.xml
@@ -67,7 +67,7 @@
-
+
@@ -165,8 +165,8 @@
-
-
+
+
No barcode available
diff --git a/addons/point_of_sale/views/report_userlabel.xml b/addons/point_of_sale/views/report_userlabel.xml
index 33281bb4c18..e6730acf9f0 100644
--- a/addons/point_of_sale/views/report_userlabel.xml
+++ b/addons/point_of_sale/views/report_userlabel.xml
@@ -14,7 +14,7 @@
- ![Barcode]() |
+ |
|
diff --git a/addons/product/report/product_packaging.xml b/addons/product/report/product_packaging.xml
index e9f462bc7cd..c31164256fa 100644
--- a/addons/product/report/product_packaging.xml
+++ b/addons/product/report/product_packaging.xml
@@ -1,10 +1,10 @@
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/addons/product/report/product_product_templates.xml b/addons/product/report/product_product_templates.xml
index 564fe745cf4..822f3b415d6 100644
--- a/addons/product/report/product_product_templates.xml
+++ b/addons/product/report/product_product_templates.xml
@@ -18,9 +18,7 @@
|
-
-
-
+
No barcode available
@@ -53,9 +51,7 @@
|
-
-
-
+
No barcode available
diff --git a/addons/stock/report/picking_templates.xml b/addons/stock/report/picking_templates.xml
index 7b41cd08d96..feed1389fb1 100644
--- a/addons/stock/report/picking_templates.xml
+++ b/addons/stock/report/picking_templates.xml
@@ -63,7 +63,7 @@
|
-
+
@@ -76,8 +76,8 @@
-
-
+
+
No barcode available
diff --git a/addons/stock/report/report_location_barcode.xml b/addons/stock/report/report_location_barcode.xml
index 6cc5ef6c986..250f6045d5f 100644
--- a/addons/stock/report/report_location_barcode.xml
+++ b/addons/stock/report/report_location_barcode.xml
@@ -14,7 +14,7 @@
-
+
|
|
diff --git a/addons/stock/report/report_lot_barcode.xml b/addons/stock/report/report_lot_barcode.xml
index 722c11abd6c..5333599c511 100644
--- a/addons/stock/report/report_lot_barcode.xml
+++ b/addons/stock/report/report_lot_barcode.xml
@@ -23,7 +23,7 @@
|
-
+
|
diff --git a/addons/stock/report/report_package_barcode.xml b/addons/stock/report/report_package_barcode.xml
index 6e0f9f55952..a9845e09438 100644
--- a/addons/stock/report/report_package_barcode.xml
+++ b/addons/stock/report/report_package_barcode.xml
@@ -13,9 +13,8 @@
-
-
+
+
|
|
@@ -66,7 +65,7 @@
-
![Barcode]()
+
@@ -113,15 +113,13 @@
-
+
|
-
-
-
+
@@ -144,7 +142,7 @@
- ![Barcode]()
+
|
diff --git a/addons/stock_picking_batch/report/report_picking_batch.xml b/addons/stock_picking_batch/report/report_picking_batch.xml
index 5e4415daefd..343ea888bd6 100644
--- a/addons/stock_picking_batch/report/report_picking_batch.xml
+++ b/addons/stock_picking_batch/report/report_picking_batch.xml
@@ -14,7 +14,7 @@
Summary:
- ![Barcode]()
+
@@ -36,7 +36,7 @@
|
-
+
|
@@ -101,14 +101,11 @@
|
-
+
|
-
-
-
-
+
|
| |