[IMP] account: Hide 'Import' button on bank statements list view
Purpose ======= It's way more complicated than the dedicated import mechanism on the dashboard NB: There are still no way to hide the import button in a generic way. This kind of ugly hack has already been done in https://github.com/odoo/enterprise/blob/master/sign/static/src/js/sign_backend.js#L53 This should be removed as soon as such a mechanism arrives. TaskID: 1861619
This commit is contained in:
committed by
Yannick Tivisse
parent
693e59a9b0
commit
93c92c72e8
@@ -0,0 +1,18 @@
|
||||
odoo.define('account.bank_statement', function(require) {
|
||||
"use strict";
|
||||
|
||||
var KanbanController = require("web.KanbanController");
|
||||
var ListController = require("web.ListController");
|
||||
|
||||
var includeDict = {
|
||||
renderButtons: function () {
|
||||
this._super.apply(this, arguments);
|
||||
if (this.modelName === "account.bank.statement") {
|
||||
this.$buttons.find('button.o_button_import').hide();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
KanbanController.include(includeDict);
|
||||
ListController.include(includeDict);
|
||||
});
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
<script type="text/javascript" src="/account/static/src/js/account_payment_field.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/account/static/src/js/bank_statement.js"></script>
|
||||
<script type="text/javascript" src="/account/static/src/js/section_and_note_fields_backend.js"></script>
|
||||
<script type="text/javascript" src="/account/static/src/js/tour.js"></script>
|
||||
</xpath>
|
||||
|
||||
Reference in New Issue
Block a user