Skip to content

Commit

Permalink
[FIX] account: bank statement reconciliation widget: wait for all rec…
Browse files Browse the repository at this point in the history
…onciliations to be displayed before to load matches, so moves lines in reconciliation proposition are correctly excluded
  • Loading branch information
Whisno committed Sep 17, 2014
1 parent de58cf4 commit 1127024
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions addons/account/static/src/js/account_widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,11 @@ openerp.account = function (instance) {
.call("get_data_for_reconciliations", [reconciliations_to_show])
.then(function (data) {
var child_promises = [];
var datum = data.shift();
child_promises.push(self.displayReconciliation(datum.st_line.id, 'match', false, true, datum.st_line, datum.reconciliation_proposition));
while ((datum = data.shift()) !== undefined)
child_promises.push(self.displayReconciliation(datum.st_line.id, 'inactive', false, true, datum.st_line, datum.reconciliation_proposition));
$.when.apply($, child_promises).then(function(){
self.$(".reconciliation_lines_container").animate({opacity: 1}, self.aestetic_animation_speed);
self.getChildren()[0].set("mode", "match");
});
});
});
Expand Down

0 comments on commit 1127024

Please sign in to comment.