mirror of
https://github.com/OCA/bank-statement-import.git
synced 2025-01-20 12:37:43 +02:00
[FIX] account_statement_import: Do not load JS on some test environment
This commit is contained in:
@@ -3,7 +3,10 @@ odoo.define("account_statement_import.dashboard.kanban", function (require) {
|
|||||||
var viewRegistry = require("web.view_registry");
|
var viewRegistry = require("web.view_registry");
|
||||||
|
|
||||||
var AccountDashboardView = viewRegistry.get("account_dashboard_kanban");
|
var AccountDashboardView = viewRegistry.get("account_dashboard_kanban");
|
||||||
var AccountDashboardController = AccountDashboardView.prototype.config.Controller;
|
// Value can be undefined on some test scenarios. Avoid an error by checking if it is defined
|
||||||
|
if (AccountDashboardView !== undefined) {
|
||||||
|
var AccountDashboardController =
|
||||||
|
AccountDashboardView.prototype.config.Controller;
|
||||||
AccountDashboardController.include({
|
AccountDashboardController.include({
|
||||||
buttons_template: "AccountDashboardView.buttons",
|
buttons_template: "AccountDashboardView.buttons",
|
||||||
// We are reusing the create button
|
// We are reusing the create button
|
||||||
@@ -18,4 +21,5 @@ odoo.define("account_statement_import.dashboard.kanban", function (require) {
|
|||||||
AccountDashboardView: AccountDashboardView,
|
AccountDashboardView: AccountDashboardView,
|
||||||
AccountDashboardController: AccountDashboardController,
|
AccountDashboardController: AccountDashboardController,
|
||||||
};
|
};
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user