From d5e97eab8b2465c968f5d2abaaabf8c33641dee6 Mon Sep 17 00:00:00 2001 From: tbe-odoo Date: Fri, 12 Jan 2018 11:30:18 +0100 Subject: [FIX] web: Kanban image not showing in some languages - In some languages the kanban images are not displayed because of a bug in human_size method in JS. This method translates the Unit Size for data and strip with the string with a comma as separator. When the translatation contains spaces after the commas (like in the French translation), there is extra spaces in the final result. This then cause an issue with the method is_bin_size that expects a unique space between the value and its unit. Resulting in a bug in the method 'kanban_image'. opw #804973 #804970 #804648 --- addons/web/static/src/js/framework/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src/js/framework/utils.js') diff --git a/addons/web/static/src/js/framework/utils.js b/addons/web/static/src/js/framework/utils.js index c1b9758b625..3e9bd87f8de 100644 --- a/addons/web/static/src/js/framework/utils.js +++ b/addons/web/static/src/js/framework/utils.js @@ -288,7 +288,7 @@ function human_size (size) { size /= 1024; ++i; } - return size.toFixed(2) + ' ' + units[i]; + return size.toFixed(2) + ' ' + units[i].trim(); } /** -- cgit v1.2.3