mirror of
https://github.com/OCA/bank-statement-import.git
synced 2025-01-20 12:37:43 +02:00
@@ -3,19 +3,23 @@ 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
|
||||||
AccountDashboardController.include({
|
if (AccountDashboardView !== undefined) {
|
||||||
buttons_template: "AccountDashboardView.buttons",
|
var AccountDashboardController =
|
||||||
// We are reusing the create button
|
AccountDashboardView.prototype.config.Controller;
|
||||||
_onButtonNew: function (ev) {
|
AccountDashboardController.include({
|
||||||
ev.stopPropagation();
|
buttons_template: "AccountDashboardView.buttons",
|
||||||
return this.trigger_up("do_action", {
|
// We are reusing the create button
|
||||||
action: "account_statement_import.account_statement_import_action",
|
_onButtonNew: function (ev) {
|
||||||
});
|
ev.stopPropagation();
|
||||||
},
|
return this.trigger_up("do_action", {
|
||||||
});
|
action: "account_statement_import.account_statement_import_action",
|
||||||
return {
|
});
|
||||||
AccountDashboardView: AccountDashboardView,
|
},
|
||||||
AccountDashboardController: AccountDashboardController,
|
});
|
||||||
};
|
return {
|
||||||
|
AccountDashboardView: AccountDashboardView,
|
||||||
|
AccountDashboardController: AccountDashboardController,
|
||||||
|
};
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -11,6 +11,13 @@
|
|||||||
<field name="model">account.journal</field>
|
<field name="model">account.journal</field>
|
||||||
<field name="inherit_id" ref="account.account_journal_dashboard_kanban_view" />
|
<field name="inherit_id" ref="account.account_journal_dashboard_kanban_view" />
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
|
<!--
|
||||||
|
We need to add the create tag in order to show buttons.
|
||||||
|
However, we will change them using the JS definition.
|
||||||
|
-->
|
||||||
|
<kanban position="attributes">
|
||||||
|
<attribute name="create">1</attribute>
|
||||||
|
</kanban>
|
||||||
<xpath expr='//span[@name="button_import_placeholder"]' position='inside'>
|
<xpath expr='//span[@name="button_import_placeholder"]' position='inside'>
|
||||||
<span>or <a
|
<span>or <a
|
||||||
type="object"
|
type="object"
|
||||||
|
|||||||
Reference in New Issue
Block a user