mirror of
https://github.com/OCA/bank-statement-import.git
synced 2025-01-20 12:37:43 +02:00
[IMP] account_statment_import: Add button for importing on top
This commit is contained in:
@@ -17,9 +17,11 @@
|
|||||||
"security/ir.model.access.csv",
|
"security/ir.model.access.csv",
|
||||||
"wizard/account_statement_import_view.xml",
|
"wizard/account_statement_import_view.xml",
|
||||||
"views/account_journal.xml",
|
"views/account_journal.xml",
|
||||||
|
"templates/assets.xml",
|
||||||
],
|
],
|
||||||
"demo": [
|
"demo": [
|
||||||
"demo/partner_bank.xml",
|
"demo/partner_bank.xml",
|
||||||
],
|
],
|
||||||
"installable": True,
|
"installable": True,
|
||||||
|
"qweb": ["static/src/xml/account_dashboard_kanban.xml"],
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
odoo.define("account_statement_import.dashboard.kanban", function (require) {
|
||||||
|
"use strict";
|
||||||
|
var viewRegistry = require("web.view_registry");
|
||||||
|
|
||||||
|
var AccountDashboardView = viewRegistry.get("account_dashboard_kanban");
|
||||||
|
var AccountDashboardController = AccountDashboardView.prototype.config.Controller;
|
||||||
|
AccountDashboardController.include({
|
||||||
|
buttons_template: "AccountDashboardView.buttons",
|
||||||
|
// We are reusing the create button
|
||||||
|
_onButtonNew: function (ev) {
|
||||||
|
ev.stopPropagation();
|
||||||
|
return this.trigger_up("do_action", {
|
||||||
|
action: "account_statement_import.account_statement_import_action",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
AccountDashboardView: AccountDashboardView,
|
||||||
|
AccountDashboardController: AccountDashboardController,
|
||||||
|
};
|
||||||
|
});
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<template>
|
||||||
|
<t t-name="AccountDashboardView.buttons">
|
||||||
|
<div>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
t-attf-class="btn #{btnClass} o-kanban-button-new"
|
||||||
|
accesskey="c"
|
||||||
|
>
|
||||||
|
<t t-esc="_t('Import Statement (OCA)')" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</t>
|
||||||
|
</template>
|
||||||
11
account_statement_import/templates/assets.xml
Normal file
11
account_statement_import/templates/assets.xml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<odoo>
|
||||||
|
<template id="assets_backend" name="account assets" inherit_id="web.assets_backend">
|
||||||
|
<xpath expr="." position="inside">
|
||||||
|
<script
|
||||||
|
type="text/javascript"
|
||||||
|
src="/account_statement_import/static/src/js/account_dashboard_kanban.js"
|
||||||
|
/>
|
||||||
|
</xpath>
|
||||||
|
</template>
|
||||||
|
</odoo>
|
||||||
@@ -39,4 +39,12 @@
|
|||||||
<field name="target">new</field>
|
<field name="target">new</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
<record id="account_statement_import_menu" model="ir.ui.menu">
|
||||||
|
<field name="name">Import Statement</field>
|
||||||
|
<field name="parent_id" ref="account.menu_finance_entries_actions" />
|
||||||
|
<field name="action" ref="account_statement_import_action" />
|
||||||
|
<field name="sequence" eval="70" />
|
||||||
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
Reference in New Issue
Block a user