Merge PR #527 into 14.0

Signed-off-by pedrobaeza
This commit is contained in:
OCA-git-bot
2022-11-29 20:25:55 +00:00
2 changed files with 26 additions and 15 deletions

View File

@@ -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,
}; };
}
}); });

View File

@@ -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"