[FIX] account_statement_import: Ensure the load of the view

In some cases, the loading was not working properly. By adding the require, the JS will wait until it is declared

Fixes #597
This commit is contained in:
Enric Tobella
2023-05-30 23:39:10 +02:00
parent 8d4b231522
commit 7c35d2f684

View File

@@ -1,7 +1,7 @@
odoo.define("account_statement_import.dashboard.kanban", function (require) { odoo.define("account_statement_import.dashboard.kanban", function (require) {
"use strict"; "use strict";
var viewRegistry = require("web.view_registry"); var viewRegistry = require("web.view_registry");
require("account.dashboard.kanban");
var AccountDashboardView = viewRegistry.get("account_dashboard_kanban"); var AccountDashboardView = viewRegistry.get("account_dashboard_kanban");
// Value can be undefined on some test scenarios. Avoid an error by checking if it is defined // Value can be undefined on some test scenarios. Avoid an error by checking if it is defined
if (AccountDashboardView !== undefined) { if (AccountDashboardView !== undefined) {