diff --git a/muk_web_utils/__manifest__.py b/muk_web_utils/__manifest__.py index 64e25d7..2262bab 100644 --- a/muk_web_utils/__manifest__.py +++ b/muk_web_utils/__manifest__.py @@ -20,7 +20,7 @@ { "name": "MuK Web Utils", "summary": """Utility Features""", - "version": "12.0.2.8.6", + "version": "12.0.2.8.7", "category": "Extra Tools", "license": "AGPL-3", "author": "MuK IT", diff --git a/muk_web_utils/static/src/js/core/async.js b/muk_web_utils/static/src/js/core/async.js index 0c72a18..779ec86 100644 --- a/muk_web_utils/static/src/js/core/async.js +++ b/muk_web_utils/static/src/js/core/async.js @@ -27,14 +27,14 @@ var QWeb = core.qweb; var syncLoop = function(items, func, callback) { items.reduce(function(promise, item) { - return promise.then(func); + return promise.then(func.bind(this, item)); }, $.Deferred().resolve()).then(callback); }; var syncProgress = function(items, func, callback, update) { var progress = 0; items.reduce(function(promise, item) { - return promise.then(function() { + return promise.done(function() { update(++progress / items.length); return func(item); });