Skip to content
Snippets Groups Projects
Commit ee45228a authored by jvm-odoo's avatar jvm-odoo Committed by Nicolas Lempereur
Browse files

[FIX] account: fix cash bank statement import button


Go on the accounting module, you'll find a kanban view with a few
cards including "Bank" and "Cash". Click on the Cash card.

The default import button doesn't appears because it is hidden.
The reason of this hiding is that the bank statements of type "Bank"
have a custom import method and the users where confuse. They
didn't know which is the right button for the special import so
we hid the default import button for the whole model.

But there is also a "Cash" type bank statement who doesn't have that
special import and his default import button is hidden too.

This commit checks the type of the bank statement and hide the default
import button only if the type is not "Cash".

OPW-2090477

closes odoo/odoo#39787

Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
parent 80a2f687
Branches
Tags
No related merge requests found
......@@ -8,7 +8,10 @@ odoo.define('account.bank_statement', function(require) {
renderButtons: function () {
this._super.apply(this, arguments);
if (this.modelName === "account.bank.statement") {
this.$buttons.find('button.o_button_import').hide();
var data = this.model.get(this.handle);
if (data.context.journal_type !== 'cash') {
this.$buttons.find('button.o_button_import').hide();
}
}
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment