111 lines
5.0 KiB
XML
111 lines
5.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<record id="fusion_statement_import_form" model="ir.ui.view">
|
|
<field name="name">fusion.statement.import.form</field>
|
|
<field name="model">fusion.statement.import</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Import Bank Statement">
|
|
|
|
<!-- Step 1: Upload -->
|
|
<group invisible="step != 'upload'">
|
|
<group>
|
|
<field name="journal_id"/>
|
|
<field name="data_file" filename="filename"/>
|
|
<field name="filename" invisible="1"/>
|
|
</group>
|
|
<group>
|
|
<p class="text-muted">
|
|
Upload an OFX, QFX, or QBO file exported from your bank portal.
|
|
Duplicate transactions will be detected automatically.
|
|
</p>
|
|
</group>
|
|
</group>
|
|
|
|
<!-- Step 2: Review -->
|
|
<group invisible="step != 'review'" string="File Summary">
|
|
<group>
|
|
<field name="account_number" readonly="1"/>
|
|
<field name="currency_code" readonly="1"/>
|
|
</group>
|
|
<group>
|
|
<field name="balance_start" readonly="1"/>
|
|
<field name="balance_end" readonly="1"/>
|
|
</group>
|
|
</group>
|
|
|
|
<div invisible="step != 'review'" class="mb-2">
|
|
<div class="d-flex gap-2 align-items-center mb-3">
|
|
<span class="badge text-bg-success fs-6">
|
|
New: <field name="total_new" class="d-inline" readonly="1"/>
|
|
</span>
|
|
<span class="badge text-bg-warning fs-6">
|
|
Duplicates: <field name="total_duplicate" class="d-inline" readonly="1"/>
|
|
</span>
|
|
<span class="badge text-bg-primary fs-6">
|
|
Selected: <field name="total_selected" class="d-inline" readonly="1"/>
|
|
</span>
|
|
<span class="flex-grow-1"/>
|
|
<button name="action_select_all_new" type="object"
|
|
class="btn btn-secondary btn-sm">
|
|
Select New Only
|
|
</button>
|
|
<button name="action_select_all" type="object"
|
|
class="btn btn-secondary btn-sm">
|
|
Select All
|
|
</button>
|
|
<button name="action_select_none" type="object"
|
|
class="btn btn-secondary btn-sm">
|
|
Deselect All
|
|
</button>
|
|
</div>
|
|
|
|
<field name="line_ids" nolabel="1">
|
|
<list editable="bottom"
|
|
decoration-danger="is_duplicate and selected"
|
|
decoration-muted="is_duplicate and not selected"
|
|
decoration-success="not is_duplicate and selected">
|
|
<field name="selected"/>
|
|
<field name="is_duplicate" string="Dup?" widget="boolean"/>
|
|
<field name="date"/>
|
|
<field name="payment_ref"/>
|
|
<field name="amount"/>
|
|
<field name="fitid"/>
|
|
</list>
|
|
</field>
|
|
</div>
|
|
|
|
<field name="step" invisible="1"/>
|
|
|
|
<footer>
|
|
<button name="action_parse" type="object"
|
|
string="Parse File" class="btn-primary"
|
|
invisible="step != 'upload'"/>
|
|
<button name="action_import" type="object"
|
|
string="Import Selected" class="btn-primary"
|
|
invisible="step != 'review'"/>
|
|
<button name="action_back" type="object"
|
|
string="Back" class="btn-secondary"
|
|
invisible="step != 'review'"/>
|
|
<button string="Cancel" class="btn-secondary" special="cancel"/>
|
|
</footer>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_fusion_statement_import" model="ir.actions.act_window">
|
|
<field name="name">Import Bank Statement</field>
|
|
<field name="res_model">fusion.statement.import</field>
|
|
<field name="view_mode">form</field>
|
|
<field name="view_id" ref="fusion_statement_import_form"/>
|
|
<field name="target">new</field>
|
|
</record>
|
|
|
|
<menuitem id="menu_fusion_statement_import"
|
|
name="Import Bank Statement (OFX)"
|
|
parent="account.account_transactions_menu"
|
|
action="action_fusion_statement_import"
|
|
sequence="90"/>
|
|
|
|
</odoo>
|