[FIX] account_reconcilication_widget: notifications

Notifications displayed at the start of the reconciliation interface are
back up and running (it was working in v10, broken in v12 and v13).
For example, when you import an OFX file and go directly to the
reconciliation interface, it will display the number of transactions
that were automatically dropped because they were already present in
Odoo (detected via the unique_import_id).
This commit is contained in:
Alexis de Lattre
2022-08-09 23:08:28 +02:00
parent fc104aabc6
commit a63e26e6fd
2 changed files with 5 additions and 0 deletions

View File

@@ -87,6 +87,7 @@ odoo.define("account.ReconciliationClientAction", function (require) {
this._super.apply(this, arguments);
this.action_manager = parent;
this.params = params;
this.notifications = params.context.notifications || [];
this.searchModelConfig.modelName = "account.bank.statement.line";
this.controlPanelProps.cp_content = {};
this.model = new this.config.Model(this, {
@@ -158,6 +159,7 @@ odoo.define("account.ReconciliationClientAction", function (require) {
valuemax: self.model.valuemax,
defaultDisplayQty: self.model.defaultDisplayQty,
title: title,
notifications: self.notifications,
});
});
});

View File

@@ -38,6 +38,9 @@ odoo.define("account.ReconciliationRenderer", function (require) {
var defs = [this._super.apply(this, arguments)];
this.time = Date.now();
this.$progress = $("");
if (this._initialState.notifications.length > 0) {
this._renderNotifications(this._initialState.notifications);
}
return Promise.all(defs);
},