mirror of
https://github.com/bringout/oca-ocb-accounting.git
synced 2026-04-26 16:21:59 +02:00
account_reconcile_oca
This commit is contained in:
parent
64fdc5b0df
commit
a8804cdf59
95 changed files with 17541 additions and 0 deletions
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2023 Dixmit
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
|
||||
<record model="ir.ui.view" id="view_account_list">
|
||||
<field name="name">account.account.tree (in account_reconcile_oca)</field>
|
||||
<field name="model">account.account</field>
|
||||
<field name="inherit_id" ref="account.view_account_list" />
|
||||
<field name="arch" type="xml">
|
||||
<button name="action_read_account" position="after">
|
||||
<button
|
||||
type="action"
|
||||
name="%(account_reconcile_oca.account_account_account_account_reconcile_act_window)s"
|
||||
string="Reconcile"
|
||||
class="float-end btn-secondary"
|
||||
attrs="{'invisible': [('reconcile', '=', False)]}"
|
||||
/>
|
||||
</button>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,169 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2023 Dixmit
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
|
||||
<record model="ir.ui.view" id="account_account_reconcile_form_view">
|
||||
<field
|
||||
name="name"
|
||||
>account.account.reconcile.form (in account_reconcile_oca)</field>
|
||||
<field name="model">account.account.reconcile</field>
|
||||
<field name="arch" type="xml">
|
||||
<form js_class="reconcile_manual" create="0">
|
||||
<field name="manual_delete" invisible="1" />
|
||||
<field name="manual_reference" invisible="1" />
|
||||
<field name="company_currency_id" invisible="1" />
|
||||
<field name="foreign_currency_id" invisible="1" />
|
||||
<field name="currency_id" invisible="1" />
|
||||
<div class="o_form_statusbar o_account_reconcile_oca_statusbar">
|
||||
<div class="o_statusbar_buttons">
|
||||
<button
|
||||
name="reconcile"
|
||||
type="object"
|
||||
string="Reconcile"
|
||||
class="btn btn-primary"
|
||||
attrs="{'invisible': [('is_reconciled', '=', True)]}"
|
||||
/>
|
||||
<button
|
||||
name="clean_reconcile"
|
||||
type="object"
|
||||
string="Clean"
|
||||
class="btn btn-secondary"
|
||||
attrs="{'invisible': [('is_reconciled', '=', True)]}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<field name="is_reconciled" invisible="1" />
|
||||
<group>
|
||||
<group>
|
||||
<field name="partner_id" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="account_id" />
|
||||
</group>
|
||||
</group>
|
||||
<field
|
||||
name="reconcile_data_info"
|
||||
nolabel="1"
|
||||
widget="account_reconcile_oca_data"
|
||||
class="w-100"
|
||||
/>
|
||||
<notebook>
|
||||
<page
|
||||
name="reconcile_line"
|
||||
string="Reconcile"
|
||||
attrs="{'invisible': [('is_reconciled', '=', True)]}"
|
||||
>
|
||||
<field
|
||||
name="add_account_move_line_id"
|
||||
widget="account_reconcile_oca_match"
|
||||
domain="[('parent_state', '=', 'posted'), ('amount_residual', '!=', 0), ('account_id', '=', account_id)]"
|
||||
context="{'search_default_partner_id': partner_id, 'tree_view_ref': 'account_reconcile_oca.account_move_line_tree_reconcile_view', 'search_view_ref': 'account_reconcile_oca.account_move_line_search_reconcile_view'}"
|
||||
/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="account_account_reconcile_search_view">
|
||||
<field
|
||||
name="name"
|
||||
>account.account.reconcile.search (in account_reconcile_oca)</field>
|
||||
<field name="model">account.account.reconcile</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="account_id" />
|
||||
<field name="partner_id" />
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="account_account_reconcile_tree_view">
|
||||
<field
|
||||
name="name"
|
||||
>account.account.reconcile.tree (in account_reconcile_oca)</field>
|
||||
<field name="model">account.account.reconcile</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<!-- TODO -->
|
||||
<field name="id" />
|
||||
<field name="account_id" />
|
||||
<field name="partner_id" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="account_account_reconcile_kanban_view">
|
||||
<field
|
||||
name="name"
|
||||
>account.account.reconcile.kanban (in account_reconcile_oca)</field>
|
||||
<field name="model">account.account.reconcile</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban js_class="reconcile">
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div
|
||||
t-attf-class="oe_kanban_card oe_kanban_global_click"
|
||||
style="width:100%"
|
||||
>
|
||||
<div>
|
||||
<field name="account_id" />
|
||||
</div>
|
||||
<div>
|
||||
<field name="partner_id" />
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="account_account_reconcile_act_window">
|
||||
<field name="name">Reconcile</field>
|
||||
<field name="res_model">account.account.reconcile</field>
|
||||
<field name="view_mode">kanban</field>
|
||||
<field name="domain">[]</field>
|
||||
<field
|
||||
name="context"
|
||||
>{'view_ref': 'account_reconcile_oca.account_account_reconcile_form_view'}</field>
|
||||
</record>
|
||||
<record
|
||||
id="res_partner_account_account_reconcile_act_window"
|
||||
model="ir.actions.act_window"
|
||||
>
|
||||
<field name="name">Reconcile</field>
|
||||
<field name="res_model">account.account.reconcile</field>
|
||||
<field name="view_mode">kanban</field>
|
||||
<field name="domain">[("partner_id", "=", active_id)]</field>
|
||||
<field
|
||||
name="context"
|
||||
>{'view_ref': 'account_reconcile_oca.account_account_reconcile_form_view'}</field>
|
||||
<field name="binding_model_id" ref="base.model_res_partner" />
|
||||
<field name="binding_view_types">form</field>
|
||||
</record>
|
||||
|
||||
<record
|
||||
id="account_account_account_account_reconcile_act_window"
|
||||
model="ir.actions.act_window"
|
||||
>
|
||||
<field name="name">Reconcile</field>
|
||||
<field name="res_model">account.account.reconcile</field>
|
||||
<field name="view_mode">kanban</field>
|
||||
<field name="domain">[("account_id", "=", active_id)]</field>
|
||||
<field
|
||||
name="context"
|
||||
>{'view_ref': 'account_reconcile_oca.account_account_reconcile_form_view'}</field>
|
||||
<field name="binding_model_id" ref="account.model_account_account" />
|
||||
<field name="binding_view_types">form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.menu" id="account_account_reconcile_menu">
|
||||
<field name="name">Reconcile</field>
|
||||
<field name="parent_id" ref="account.menu_finance_entries_actions" />
|
||||
<field name="action" ref="account_account_reconcile_act_window" />
|
||||
<field name="sequence" eval="10" />
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2023 Dixmit
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
|
||||
<record id="account_bank_statement_form_edit" model="ir.ui.view">
|
||||
<field name="name">Edit Bank statement</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="priority">99</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Bank Statement">
|
||||
<div
|
||||
class="alert alert-warning text-center"
|
||||
role="alert"
|
||||
attrs="{'invisible': [('is_valid', '=',True), ('is_complete','=',True)]}"
|
||||
>
|
||||
<field name="problem_description" />
|
||||
<field name="is_valid" invisible="1" />
|
||||
<field name="is_complete" invisible="1" />
|
||||
</div>
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="name" required="1" />
|
||||
<field name="balance_start" />
|
||||
<field name="balance_end_real" />
|
||||
<field name="attachment_ids" widget="many2many_binary" />
|
||||
<field name="line_ids" invisible="1" />
|
||||
</group>
|
||||
</sheet>
|
||||
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_bank_statement_form" model="ir.ui.view">
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field
|
||||
name="inherit_id"
|
||||
ref="account_statement_base.view_bank_statement_form"
|
||||
/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath
|
||||
expr="//button[contains(@context,'search_default_statement_id')]"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute name="type">object</attribute>
|
||||
<attribute name="name">action_open_statement_lines</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_bank_statement_action_edit" model="ir.actions.act_window">
|
||||
<field name="name">Edit Bank Statement</field>
|
||||
<field name="res_model">account.bank.statement</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field
|
||||
name="view_ids"
|
||||
eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'form', 'view_id': ref('account_bank_statement_form_edit')})]"
|
||||
/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,426 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2023 Dixmit
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
|
||||
<record id="bank_statement_line_reconcile_view" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.line.reconcile</field>
|
||||
<field name="model">account.bank.statement.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban js_class="reconcile">
|
||||
<field name="is_reconciled" />
|
||||
<field name="currency_id" />
|
||||
<field name="foreign_currency_id" />
|
||||
<field name="statement_id" />
|
||||
<field name="statement_balance_end_real" />
|
||||
<field name="to_check" />
|
||||
<field name="reconcile_aggregate" />
|
||||
<field name="aggregate_id" />
|
||||
<field name="aggregate_name" />
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div
|
||||
t-if="record.reconcile_aggregate.raw_value == 'statement' and !record.statement_id.raw_value"
|
||||
class="o_reconcile_create_statement text-center"
|
||||
>
|
||||
<a
|
||||
role="button"
|
||||
class="btn btn-secondary btn-sm"
|
||||
tabindex="-1"
|
||||
type="object"
|
||||
name="add_statement"
|
||||
>
|
||||
Statement
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
t-attf-class="oe_kanban_card oe_kanban_global_click"
|
||||
style="width:100%"
|
||||
>
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<field name="date" />
|
||||
</div>
|
||||
<div class="col-4" style="text-align:right">
|
||||
<field
|
||||
name="amount"
|
||||
t-if="! record.foreign_currency_id.raw_value"
|
||||
/>
|
||||
<field
|
||||
name="amount_currency"
|
||||
t-if="record.foreign_currency_id.raw_value"
|
||||
widget="monetary"
|
||||
options="{'currency_field': 'foreign_currency_id'}"
|
||||
/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<field name="partner_id" widget="badge" />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<field name="payment_ref" />
|
||||
</div>
|
||||
<div class="col-4" style="text-align:right">
|
||||
<div
|
||||
t-if="record.to_check.raw_value"
|
||||
class="badge text-bg-warning"
|
||||
>
|
||||
To check
|
||||
</div>
|
||||
<div
|
||||
t-if="record.is_reconciled.raw_value"
|
||||
class="badge text-bg-success"
|
||||
>
|
||||
Reconciled
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="bank_statement_line_form_add_view" model="ir.ui.view">
|
||||
<field
|
||||
name="name"
|
||||
>Simple form view to manually create an account.bank.statement.line</field>
|
||||
<field name="model">account.bank.statement.line</field>
|
||||
<field name="priority">99</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<group>
|
||||
<group>
|
||||
<field name="suitable_journal_ids" invisible="1" />
|
||||
<field name="state" invisible="1" />
|
||||
<field name="currency_id" invisible="0" />
|
||||
<field name="company_id" invisible="0" />
|
||||
<field name="date" />
|
||||
<field name="payment_ref" required="1" />
|
||||
<field name="partner_id" />
|
||||
<field
|
||||
name="statement_id"
|
||||
domain="[('journal_id', '=', journal_id)]"
|
||||
/>
|
||||
<field
|
||||
name="journal_id"
|
||||
invisible="context.get('default_journal_id')"
|
||||
/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="amount" />
|
||||
<field
|
||||
name="foreign_currency_id"
|
||||
domain="[('id', '!=', currency_id)]"
|
||||
groups="base.group_multi_currency"
|
||||
/>
|
||||
<field
|
||||
name="amount_currency"
|
||||
groups="base.group_multi_currency"
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
<footer>
|
||||
<button
|
||||
string="Save"
|
||||
type="object"
|
||||
name="save"
|
||||
class="btn btn-primary"
|
||||
/>
|
||||
<button string="Cancel" class="btn-secondary" special="cancel" />
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="bank_statement_line_form_reconcile_view" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.line.reconcile</field>
|
||||
<field name="model">account.bank.statement.line</field>
|
||||
<field name="priority">99</field>
|
||||
<field name="arch" type="xml">
|
||||
<form js_class="reconcile_form">
|
||||
<div class="o_form_statusbar o_account_reconcile_oca_statusbar">
|
||||
<div class="o_statusbar_buttons">
|
||||
<button
|
||||
name="reconcile_bank_line"
|
||||
type="object"
|
||||
string="Validate"
|
||||
accesskey="v"
|
||||
class="btn btn-primary"
|
||||
attrs="{'invisible': ['|', ('is_reconciled', '=', True), ('can_reconcile', '=', False)]}"
|
||||
/>
|
||||
<button
|
||||
name="reconcile_bank_line"
|
||||
type="object"
|
||||
string="Reconcile"
|
||||
class="btn btn-primary disabled"
|
||||
attrs="{'invisible': ['|', ('is_reconciled', '=', True), ('can_reconcile', '=', True)]}"
|
||||
/>
|
||||
<button
|
||||
name="unreconcile_bank_line"
|
||||
type="object"
|
||||
string="Unreconcile"
|
||||
accesskey="r"
|
||||
class="btn btn-warning"
|
||||
attrs="{'invisible': [('is_reconciled', '=', False)]}"
|
||||
confirm="Are you sure that the move should be unreconciled?"
|
||||
/>
|
||||
<button
|
||||
name="clean_reconcile"
|
||||
type="object"
|
||||
string="Reset reconciliation"
|
||||
class="btn btn-secondary"
|
||||
attrs="{'invisible': [('is_reconciled', '=', True)]}"
|
||||
/>
|
||||
<button
|
||||
name="action_to_check"
|
||||
string="To Check"
|
||||
class="btn btn-secondary"
|
||||
accesskey="c"
|
||||
type="object"
|
||||
attrs="{'invisible': [('to_check', '=', True)]}"
|
||||
/>
|
||||
<button
|
||||
name="action_checked"
|
||||
string="Set as Checked"
|
||||
accesskey="c"
|
||||
type="object"
|
||||
attrs="{'invisible': [('to_check', '=', False)]}"
|
||||
/>
|
||||
<button
|
||||
name="action_show_move"
|
||||
type="object"
|
||||
accesskey="m"
|
||||
string="View move"
|
||||
class="btn btn-info"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<field name="id" invisible="1" />
|
||||
<field name="name" invisible="1" />
|
||||
<field name="can_reconcile" invisible="1" />
|
||||
<field name="to_check" invisible="1" />
|
||||
<field name="partner_id" invisible="1" />
|
||||
<field name="company_id" invisible="1" />
|
||||
<field name="journal_id" invisible="1" />
|
||||
<field name="suitable_journal_ids" invisible="1" />
|
||||
<field name="manual_reference" invisible="1" />
|
||||
<field name="manual_delete" invisible="1" />
|
||||
<field name="is_reconciled" invisible="1" />
|
||||
<field name="foreign_currency_id" invisible="1" />
|
||||
<field name="company_currency_id" invisible="1" />
|
||||
<field name="previous_manual_amount_in_currency" invisible="1" />
|
||||
<field name="currency_id" invisible="1" />
|
||||
<field
|
||||
name="reconcile_data_info"
|
||||
nolabel="1"
|
||||
widget="account_reconcile_oca_data"
|
||||
class="w-100"
|
||||
/>
|
||||
<div>
|
||||
<field
|
||||
name="manual_model_id"
|
||||
widget="selection_badge_uncheck"
|
||||
nolabel="1"
|
||||
attrs="{'invisible': [('is_reconciled', '=', True)]}"
|
||||
/>
|
||||
</div>
|
||||
<notebook>
|
||||
<page
|
||||
name="reconcile_line"
|
||||
string="Reconcile"
|
||||
attrs="{'invisible': [('is_reconciled', '=', True)]}"
|
||||
>
|
||||
<field
|
||||
name="add_account_move_line_id"
|
||||
widget="account_reconcile_oca_match"
|
||||
domain="[('parent_state', '=', 'posted'),('amount_residual', '!=', 0),('account_id.reconcile', '=', True), ('company_id', '=', company_id), ('statement_line_id', '!=', id)]"
|
||||
context="{'search_default_partner_id': partner_id, 'tree_view_ref': 'account_reconcile_oca.account_move_line_tree_reconcile_view', 'search_view_ref': 'account_reconcile_oca.account_move_line_search_reconcile_view'}"
|
||||
/>
|
||||
</page>
|
||||
<page name="manual" string="Manual operation">
|
||||
<group>
|
||||
<group>
|
||||
<field name="manual_line_id" invisible="1" />
|
||||
<field
|
||||
name="manual_exchange_counterpart"
|
||||
invisible="1"
|
||||
/>
|
||||
<field name="manual_in_currency_id" invisible="1" />
|
||||
<field name="manual_in_currency" invisible="1" />
|
||||
<field name="manual_kind" invisible="1" />
|
||||
<field
|
||||
name="manual_account_id"
|
||||
string="Account"
|
||||
attrs="{'readonly': ['|', '|', '|', ('manual_exchange_counterpart', '=', True),('manual_reference', '=', False), ('is_reconciled', '=', True), ('manual_line_id', '!=', False)]}"
|
||||
/>
|
||||
<field
|
||||
name="manual_partner_id"
|
||||
string="Partner"
|
||||
attrs="{'readonly': ['|', '|', '|', ('manual_exchange_counterpart', '=', True),('manual_reference', '=', False), ('is_reconciled', '=', True), '&', ('manual_line_id', '!=', False), ('manual_kind', '!=', 'liquidity')]}"
|
||||
/>
|
||||
<field
|
||||
name="analytic_distribution"
|
||||
widget="analytic_distribution"
|
||||
groups="analytic.group_analytic_accounting"
|
||||
options="{'account_field': 'manual_account_id', 'business_domain': 'general'}"
|
||||
attrs="{'invisible': ['|', ('manual_kind', '=', 'liquidity'), ('manual_reference', '=', False)], 'readonly': [('is_reconciled', '=', True)]}"
|
||||
/>
|
||||
</group>
|
||||
<group>
|
||||
<field
|
||||
name="manual_name"
|
||||
string="Name"
|
||||
attrs="{'readonly': ['|', '|', '|', ('manual_exchange_counterpart', '=', True), ('manual_reference', '=', False), ('is_reconciled', '=', True), '&', ('manual_line_id', '!=', False), ('manual_kind', '!=', 'liquidity')]}"
|
||||
/>
|
||||
<field
|
||||
name="manual_amount_in_currency"
|
||||
string="Amount in Currency"
|
||||
attrs="{'invisible': [('manual_in_currency', '=', False)], 'readonly': ['|', '|', ('manual_exchange_counterpart', '=', True), ('manual_reference', '=', False), ('is_reconciled', '=', True)]}"
|
||||
/>
|
||||
<field
|
||||
name="manual_amount"
|
||||
string="Amount"
|
||||
attrs="{'readonly': ['|', '|', ('manual_exchange_counterpart', '=', True), ('manual_reference', '=', False), ('is_reconciled', '=', True)]}"
|
||||
/>
|
||||
<field name="manual_currency_id" invisible="1" />
|
||||
<field name="manual_original_amount" invisible="1" />
|
||||
<field name="manual_move_type" invisible="1" />
|
||||
<label
|
||||
for="manual_move_id"
|
||||
string=""
|
||||
attrs="{'invisible': ['|', ('manual_move_type', 'not in', ['in_invoice', 'in_refund', 'out_invoice', 'out_refund']), ('manual_original_amount', '=', 0)]}"
|
||||
/>
|
||||
<div
|
||||
attrs="{'invisible': ['|', ('manual_move_type', 'not in', ['in_invoice', 'in_refund', 'out_invoice', 'out_refund']), ('manual_original_amount', '=', 0)]}"
|
||||
>
|
||||
Invoice <field
|
||||
class="oe_inline"
|
||||
name="manual_move_id"
|
||||
/>
|
||||
with an open amount <field
|
||||
class="oe_inline"
|
||||
name="manual_original_amount"
|
||||
/> will be reduced by <field
|
||||
class="oe_inline"
|
||||
name="manual_amount"
|
||||
readonly="1"
|
||||
/>.
|
||||
<br />
|
||||
You might want to set the invoice as <button
|
||||
name="button_manual_reference_full_paid"
|
||||
type="object"
|
||||
method_args="[1]"
|
||||
>fully paid</button>.
|
||||
</div>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page name="narration" string="Narration">
|
||||
<field name="payment_ref" />
|
||||
<field name="narration" />
|
||||
</page>
|
||||
<page name="chatter" string="Chatter">
|
||||
<field name="move_id" widget="account_reconcile_oca_chatter" />
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_bank_statement_line_reconcile" model="ir.actions.act_window">
|
||||
<field name="name">Statement lines</field>
|
||||
<field name="res_model">account.bank.statement.line</field>
|
||||
<field name="domain">[('journal_id', '=', active_id)]</field>
|
||||
<field
|
||||
name="context"
|
||||
>{'default_journal_id': active_id, 'search_default_not_reconciled': True, 'view_ref': 'account_reconcile_oca.bank_statement_line_form_reconcile_view'}</field>
|
||||
<field name="view_mode">kanban,tree</field>
|
||||
<field
|
||||
name="view_ids"
|
||||
eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'kanban', 'view_id': ref('bank_statement_line_reconcile_view')}),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('account_statement_base.account_bank_statement_line_tree')})]"
|
||||
/>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Nothing to reconcile
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_bank_statement_line_reconcile_all" model="ir.actions.act_window">
|
||||
<field name="name">Reconcile bank statement lines</field>
|
||||
<field name="res_model">account.bank.statement.line</field>
|
||||
<field name="domain">[('journal_id', '=', active_id)]</field>
|
||||
<field
|
||||
name="context"
|
||||
>{'default_journal_id': active_id, 'view_ref': 'account_reconcile_oca.bank_statement_line_form_reconcile_view'}</field>
|
||||
<field name="view_mode">kanban,tree</field>
|
||||
<field
|
||||
name="view_ids"
|
||||
eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'kanban', 'view_id': ref('bank_statement_line_reconcile_view')}),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('account_statement_base.account_bank_statement_line_tree')})]"
|
||||
/>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Nothing to reconcile
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<record
|
||||
id="action_bank_statement_line_reconcile_to_check"
|
||||
model="ir.actions.act_window"
|
||||
>
|
||||
<field name="name">Reconcile bank statement lines</field>
|
||||
<field name="res_model">account.bank.statement.line</field>
|
||||
<field name="domain">[('journal_id', '=', active_id)]</field>
|
||||
<field
|
||||
name="context"
|
||||
>{'default_journal_id': active_id, 'search_default_to_check': True, 'view_ref': 'account_reconcile_oca.bank_statement_line_form_reconcile_view'}</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field
|
||||
name="view_ids"
|
||||
eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('bank_statement_line_reconcile_view')})]"
|
||||
/>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Nothing to check
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record
|
||||
id="action_bank_statement_line_move_view_reconcile"
|
||||
model="ir.actions.act_window"
|
||||
>
|
||||
<field name="name">Reconcile bank statement lines</field>
|
||||
<field name="res_model">account.bank.statement.line</field>
|
||||
<field name="context">{'search_default_move_id': active_id}</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field
|
||||
name="view_ids"
|
||||
eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('bank_statement_line_reconcile_view')})]"
|
||||
/>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Nothing to reconcile
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_bank_statement_line_create" model="ir.actions.act_window">
|
||||
<field name="name">Add Bank Statement Line</field>
|
||||
<field name="res_model">account.bank.statement.line</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field
|
||||
name="view_ids"
|
||||
eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'form', 'view_id': ref('bank_statement_line_form_add_view')})]"
|
||||
/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2023 Dixmit
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
|
||||
<record id="view_account_journal_form" model="ir.ui.view">
|
||||
<field name="name">account.journal.inherit.dashboard.kanban</field>
|
||||
<field name="model">account.journal</field>
|
||||
<field name="inherit_id" ref="account.view_account_journal_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="suspense_account_id" position="before">
|
||||
<field
|
||||
name="reconcile_mode"
|
||||
attrs="{'required': [('type', 'in', ('bank', 'cash'))], 'invisible': [('type', 'not in', ('bank', 'cash'))]}"
|
||||
options="{'no_quick_create': True}"
|
||||
groups="account.group_account_readonly"
|
||||
/>
|
||||
<field
|
||||
name="reconcile_aggregate"
|
||||
attrs="{'invisible': [('type','not in', ['bank', 'cash'])]}"
|
||||
groups="account.group_account_readonly"
|
||||
/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_journal_dashboard_kanban_view" model="ir.ui.view">
|
||||
<field name="name">account.journal.inherit.dashboard.kanban</field>
|
||||
<field name="model">account.journal</field>
|
||||
<field name="inherit_id" ref="account.account_journal_dashboard_kanban_view" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath
|
||||
expr="//kanban/templates//div[@id='dashboard_bank_cash_left']/t[1]"
|
||||
position="before"
|
||||
>
|
||||
<t t-if="dashboard.number_to_reconcile > 0">
|
||||
<button
|
||||
type="action"
|
||||
name="%(account_reconcile_oca.action_bank_statement_line_reconcile)s"
|
||||
class="btn btn-primary"
|
||||
> Reconcile <t
|
||||
t-esc="dashboard.number_to_reconcile"
|
||||
/> Items</button>
|
||||
</t>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="//kanban/templates//div[@id='dashboard_bank_cash_right']"
|
||||
position="inside"
|
||||
>
|
||||
<t t-if="dashboard.number_to_check > 0">
|
||||
<div class="row">
|
||||
<div class="col overflow-hidden text-left">
|
||||
<a
|
||||
type="action"
|
||||
name="%(account_reconcile_oca.action_bank_statement_line_reconcile_to_check)s"
|
||||
>
|
||||
<t t-esc="dashboard.number_to_check" /> to check</a>
|
||||
</div>
|
||||
<div class="col-auto text-right">
|
||||
<span>
|
||||
<t t-esc="dashboard.to_check_balance" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//div[@id='card_action_view_menus']" position="after">
|
||||
<div>
|
||||
<a
|
||||
role="menuitem"
|
||||
type="action"
|
||||
name="%(account_reconcile_oca.action_bank_statement_line_reconcile_all)s"
|
||||
>Transactions</a>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2023 Dixmit
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
|
||||
<record model="ir.ui.view" id="account_move_form_view">
|
||||
<field name="name">account.move.form (in account_reconcile_oca)</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form" />
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box" position="inside">
|
||||
<button
|
||||
type="action"
|
||||
name="%(account_reconcile_oca.action_bank_statement_line_move_view_reconcile)s"
|
||||
string="Bank reconcile"
|
||||
context="{'search_default_move_id': id}"
|
||||
class="btn btn-primary"
|
||||
icon="fa-list"
|
||||
attrs="{'invisible': [('statement_line_id', '=', False)]}"
|
||||
/>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,114 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2023 Dixmit
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
|
||||
<record id="account_move_line_tree_reconcile_view" model="ir.ui.view">
|
||||
<field name="name">account.move.line.tree.reconcile</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="priority">99</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree js_class="reconcile_move_line">
|
||||
<field name="date" />
|
||||
<field name="move_id" optional="show" />
|
||||
<field name="date_maturity" optional="show" />
|
||||
<field name="account_id" optional="show" />
|
||||
<field name="partner_id" />
|
||||
<field name="company_currency_id" invisible="1" />
|
||||
<field name="currency_id" invisible="1" />
|
||||
<field name="name" optional="show" />
|
||||
<field name="amount_residual_currency" optional="hide" />
|
||||
<field name="amount_residual" optional="show" />
|
||||
<field name="debit" optional="hide" />
|
||||
<field name="credit" optional="hide" />
|
||||
<button
|
||||
type="object"
|
||||
name="action_open_business_doc"
|
||||
string="View"
|
||||
class="btn btn-secondary"
|
||||
/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="account_move_line_search_reconcile_view" model="ir.ui.view">
|
||||
<field name="name">account.move.line.search.reconcile</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="priority">99</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Journal Items">
|
||||
<field
|
||||
name="name"
|
||||
string="Journal Item"
|
||||
filter_domain="['|','|','|','|','|',('name', 'ilike', self), ('ref', 'ilike', self), ('account_id', 'ilike', self), ('partner_id', 'ilike', self),('amount_residual', 'ilike', self),('amount_residual_currency', 'ilike', self)]"
|
||||
/>
|
||||
<field name="name" />
|
||||
<field name="ref" />
|
||||
<field name="date" />
|
||||
<field name="account_id" />
|
||||
<field name="account_root_id" />
|
||||
<field name="account_type" />
|
||||
<field name="partner_id" domain="[('parent_id', '=', False)]" />
|
||||
<field name="journal_id" />
|
||||
<field
|
||||
name="move_id"
|
||||
string="Journal Entry"
|
||||
filter_domain="[ '|', '|', ('move_id.name', 'ilike', self), ('move_id.ref', 'ilike', self), ('move_id.partner_id', 'ilike', self)]"
|
||||
/>
|
||||
<separator />
|
||||
<filter
|
||||
string="Sales"
|
||||
name="sales"
|
||||
domain="[('journal_id.type', '=', 'sale')]"
|
||||
context="{'default_journal_type': 'sale'}"
|
||||
/>
|
||||
<filter
|
||||
string="Purchases"
|
||||
name="purchases"
|
||||
domain="[('journal_id.type', '=', 'purchase')]"
|
||||
context="{'default_journal_type': 'purchase'}"
|
||||
/>
|
||||
<filter
|
||||
string="Bank"
|
||||
name="bank"
|
||||
domain="[('journal_id.type', '=', 'bank')]"
|
||||
context="{'default_journal_type': 'bank'}"
|
||||
/>
|
||||
<filter
|
||||
string="Cash"
|
||||
name="cash"
|
||||
domain="[('journal_id.type', '=', 'cash')]"
|
||||
context="{'default_journal_type': 'cash'}"
|
||||
/>
|
||||
<filter
|
||||
string="Miscellaneous"
|
||||
domain="[('journal_id.type', '=', 'general')]"
|
||||
name="misc_filter"
|
||||
context="{'default_journal_type': 'general'}"
|
||||
/>
|
||||
<separator />
|
||||
<filter
|
||||
string="Payable"
|
||||
domain="[('account_id.account_type', '=', 'liability_payable'), ('account_id.non_trade', '=', False)]"
|
||||
help="From Trade Payable accounts"
|
||||
name="trade_payable"
|
||||
/>
|
||||
<filter
|
||||
string="Receivable"
|
||||
domain="[('account_id.account_type', '=', 'asset_receivable'), ('account_id.non_trade', '=', False)]"
|
||||
help="From Trade Receivable accounts"
|
||||
name="trade_receivable"
|
||||
/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_reconcile" model="ir.actions.server">
|
||||
<field name="name">Reconcile</field>
|
||||
<field name="model_id" ref="account.model_account_move_line" />
|
||||
<field name="binding_model_id" ref="account.model_account_move_line" />
|
||||
<field name="binding_view_types">list</field>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = records.action_reconcile_manually()</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2024 Dixmit
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
|
||||
<record model="ir.ui.view" id="res_config_settings_form_view">
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="account.res_config_settings_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@id='bank_cash']" position="inside">
|
||||
<div
|
||||
class="col-12 col-lg-6 o_setting_box"
|
||||
id="reconcile_aggregate"
|
||||
title="Standard aggregation to use on bank reconciliation"
|
||||
>
|
||||
<div class="o_setting_left_pane">
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label
|
||||
for="reconcile_aggregate"
|
||||
string="Reconcile aggregation"
|
||||
/>
|
||||
<div class="o_setting_container">
|
||||
<field name="reconcile_aggregate" />
|
||||
</div>
|
||||
|
||||
<div class="text-muted">
|
||||
Standard aggregation to use on bank reconciliation
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue