初始提交

This commit is contained in:
2026-11-04 19:58:07 +08:00
commit 53b7d22429
829 changed files with 469986 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
<?xml version='1.0' encoding='utf-8'?>
<odoo>
<record id="account_tag_action" model="ir.actions.act_window">
<field name="name">Account Tags</field>
<field name="res_model">account.account.tag</field>
<field name="search_view_id" ref="account.account_tag_view_search"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Add a new tag
</p>
</field>
</record>
<record id="view_account_form" model="ir.ui.view">
<field name="name">account.account.form</field>
<field name="model">account.account</field>
<field name="inherit_id" ref="account.view_account_form"/>
<field name="arch" type="xml">
<field name="currency_id" position="after">
<label for="reconcile" invisible="account_type in ('asset_cash', 'liability_credit_card', 'off_balance')"/>
<div invisible="account_type in ('asset_cash', 'liability_credit_card', 'off_balance')">
<field name="reconcile"/>
<button name="action_open_reconcile" class="oe_link" type="object" string=" -> Reconcile" invisible="not reconcile"/>
</div>
</field>
<field name="tag_ids" position="after">
<field name="is_deferred" invisible="account_type not in ('expense', 'expense_other', 'income', 'income_other')"/>
<field name="deferred_account_id"
invisible="account_type not in ('expense', 'expense_other', 'income', 'income_other')"
domain="[('account_type', 'in', ['liability_current'] if account_type in ('income', 'income_other') else ['asset_current', 'asset_prepayments'])]"
placeholder="Default"/>
</field>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<odoo>
<menuitem id="menu_account_reconcile" name="Reconcile" parent="account.account_closing_menu" action="action_move_line_posted_unreconciled" sequence="65" groups="account.group_account_user"/>
<menuitem id="account_tag_menu" parent="account.account_account_menu" action="account_tag_action" groups="base.group_no_one"/>
<menuitem id="menu_account_fiscal_year" parent="account.account_account_menu" action="actions_account_fiscal_year" groups="account_accountant.group_fiscal_year"/>
</odoo>

View File

@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="actions_account_fiscal_year" model="ir.actions.act_window">
<field name="name">Fiscal Years</field>
<field name="res_model">account.fiscal.year</field>
<field name="view_mode">list,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click here to create a new fiscal year.
</p>
</field>
</record>
<record id="action_account_fiscal_year_form" model="ir.ui.view">
<field name="name">account.fiscal.year.form</field>
<field name="model">account.fiscal.year</field>
<field name="arch" type="xml">
<form>
<sheet>
<group>
<field name="name" placeholder="Fiscal Year 2018"/>
<field name="date_from"/>
<field name="date_to"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="action_account_fiscal_year_search" model="ir.ui.view">
<field name="name">account.fiscal.year.search</field>
<field name="model">account.fiscal.year</field>
<field name="arch" type="xml">
<search>
<field name="name"/>
</search>
</field>
</record>
<record id="action_account_fiscal_year_tree" model="ir.ui.view">
<field name="name">account.fiscal.year.list</field>
<field name="model">account.fiscal.year</field>
<field name="arch" type="xml">
<list>
<field name="name"/>
<field name="date_from"/>
<field name="date_to"/>
<field name="company_id" groups="base.group_multi_company"/>
</list>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,47 @@
<odoo>
<record id="account_journal_dashboard_kanban_view" model="ir.ui.view">
<field name="name">account.journal.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">
<kanban position="attributes">
<attribute name="create">false</attribute>
</kanban>
<xpath expr="//div[@id='sale_purchase_refund']" position="after">
<div>
<a type="object" name="action_open_reconcile" groups="account.group_account_user">Payments Matching</a>
</div>
</xpath>
<!-- The following section handles the reconcile button -->
<xpath expr="//div[@name='bank_cash_buttons']" position="inside">
<button t-if="dashboard.number_to_reconcile > 0" type="object" name="action_open_reconcile" class="btn btn-secondary d-block text-nowrap" groups="account.group_account_basic"><t t-out="dashboard.number_to_reconcile"/> to reconcile</button>
</xpath>
<xpath expr="//div[@id='dashboard_bank_cash_right']" position="inside">
<t t-if="dashboard.number_to_check > 0">
<div class="row" groups="account.group_account_readonly">
<div class="col overflow-hidden text-start">
<a type="object" name="action_open_to_check"><t t-out="dashboard.number_to_check"/> To Review</a>
</div>
<div class="col-auto text-end">
<span dir="ltr"><t t-out="dashboard.to_check_balance"/></span>
</div>
</div>
</t>
</xpath>
<xpath expr="//h5[@id='card_action_view_menus']" position="after">
<div>
<a role="menuitem" type="object" name="action_open_bank_transactions">Transactions</a>
</div>
</xpath>
</field>
</record>
<record id="action_journal_create_wizard" model="ir.actions.client">
<field name="name">What type of journal do you want to add?</field>
<field name="tag">journal_create_wizard</field>
<field name="target">new</field>
<field name="context">{'footer': false}</field>
</record>
</odoo>

View File

@@ -0,0 +1,14 @@
<odoo>
<record id="view_account_journal_tree_inherit" model="ir.ui.view">
<field name="name">account.journal.list.inherit</field>
<field name="model">account.journal</field>
<field name="inherit_id" ref="account.view_account_journal_tree"/>
<field name="arch" type="xml">
<list>
<header>
<button string="New" type="action" name="account_accountant.action_journal_create_wizard" display="always" class="btn-primary" invisible= "context.get('hide_create_wizard', False)"/>
</header>
</list>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,204 @@
<?xml version='1.0' encoding='utf-8'?>
<odoo>
<record id="view_move_line_tree" model="ir.ui.view">
<field name="name">account.move.line.list</field>
<field name="model">account.move.line</field>
<field name="inherit_id" ref="account.view_move_line_tree"/>
<field name="mode">extension</field>
<field name="arch" type="xml">
<xpath expr="//list" position="attributes">
<attribute name="js_class">account_move_line_list</attribute>
</xpath>
<xpath expr="//list" position="inside">
<header>
<button name="action_reconcile" type="object" string="Reconcile" groups="account.group_account_user" data-hotkey="r"/>
<button name="action_split_lines" type="object" string="Split" groups="account.group_account_user"/>
</header>
<field name="is_account_reconcile" column_invisible="True"/>
<field name="has_deferred_moves" column_invisible="True"/>
</xpath>
<xpath expr="//list/field[@name='name']" position="after">
<field name="deferred_start_date" string="Deferred Date" widget="daterange" options="{'end_date_field': 'deferred_end_date', 'always_range': True}" optional="hide" readonly="has_deferred_moves"/>
<field name="deferred_end_date" required="deferred_start_date" column_invisible="1"/>
</xpath>
<xpath expr="//list/field[@name='matching_number']" position="attributes">
<attribute name="widget">matching_link_widget</attribute>
</xpath>
</field>
</record>
<record id="view_move_line_payment_tree" model="ir.ui.view">
<field name="name">account.move.line.payment.list</field>
<field name="model">account.move.line</field>
<field name="inherit_id" ref="account.view_move_line_payment_tree"/>
<field name="mode">extension</field>
<field name="arch" type="xml">
<xpath expr="//button[@name='action_payment_items_register_payment']" position="after">
<button name="action_reconcile" type="object" string="Reconcile" groups="account.group_account_user"/>
</xpath>
</field>
</record>
<record id="view_move_form_inherit" model="ir.ui.view">
<field name="name">account.move.form.inherit</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<xpath expr="//page[@id='other_tab']//field[@name='fiscal_position_id']" position="after">
<field name="inalterable_hash" groups="base.group_no_one"/>
</xpath>
<xpath expr="//page[@id='other_tab_entry']//field[@name='company_id']" position="after">
<field name="inalterable_hash" groups="base.group_no_one"/>
</xpath>
<xpath expr="//page[@id='invoice_tab']//list/field[@name='analytic_distribution']" position="after">
<!-- the deferred dates are shown under account not in a separate column due to widget m2o_cell_with_extra_fields -->
<field name="has_deferred_moves" column_invisible="1"/>
<field name="has_abnormal_deferred_dates" column_invisible="1"/>
<field name="is_deferred_account" column_invisible="1"/>
<field name="deferred_start_date" string="Deferred Date" optional="hide" required="is_deferred_account"/>
<field name="deferred_end_date" required="deferred_start_date" column_invisible="1"/>
</xpath>
<xpath expr="//page[@id='aml_tab']//list/field[@name='analytic_distribution']" position="after">
<field name="deferred_start_date" string="Deferred Date" widget="daterange" options="{'end_date_field': 'deferred_end_date', 'always_range': True}" optional="hide" decoration-warning="has_abnormal_deferred_dates"/>
<field name="deferred_end_date" required="deferred_start_date" column_invisible="1"/>
</xpath>
<xpath expr="//div[@name='button_box']" position="inside">
<button name="action_open_bank_reconciliation_widget_statement"
class="oe_stat_button"
icon="menu"
type="object"
invisible="not statement_id or state == 'cancel'">
<div class="o_stat_info">
<span class="o_stat_text">Bank Statement</span>
</div>
</button>
<button name="action_open_bank_reconciliation_widget"
class="oe_stat_button"
icon="menu"
type="object"
invisible="move_type != 'entry' or not id or not statement_line_id or state == 'cancel'">
<div class="o_stat_info">
<span class="o_stat_text">1 Bank Transaction</span>
</div>
</button>
<field name="deferred_move_ids" invisible="1"/>
<field name="deferred_original_move_ids" invisible="1"/>
<field name="deferred_entry_type" invisible="1"/>
<button name="open_deferred_entries"
class="oe_stat_button"
icon="menu"
type="object"
invisible="not deferred_move_ids"
string="Deferral Entries">
</button>
<button name="open_deferred_original_entry"
class="oe_stat_button"
icon="menu"
type="object"
invisible="deferred_entry_type != 'expense' or not deferred_original_move_ids"
string="Related Purchase(s)">
</button>
<button name="open_deferred_original_entry"
class="oe_stat_button"
icon="menu"
type="object"
invisible="deferred_entry_type != 'revenue' or not deferred_original_move_ids"
string="Related Sale(s)">
</button>
<button name="open_deferred_original_entry"
class="oe_stat_button"
icon="menu"
type="object"
invisible="deferred_entry_type != 'misc' or not deferred_original_move_ids"
string="Related Entries">
</button>
</xpath>
</field>
</record>
<record id="view_bank_rec_edit_line" model="ir.ui.view">
<field name="name">account.move.line.bank.rec.edit.line</field>
<field name="model">account.move.line</field>
<field name="arch" type="xml">
<form string="Journal Item" js_class="bankrec_edit_line">
<sheet>
<field name="has_invalid_analytics" invisible="1"/>
<div invisible="not has_invalid_analytics" class="alert alert-warning mb-3" role="alert">
This line requires analytic distribution.
</div>
<group>
<group name="left_group">
<field name="move_id" invisible="1"/>
<field name="amount_currency" invisible="1"/> <!-- Needed so that the onchange has the amount currency everytime -->
<label for="balance"/>
<div class="d-flex justify-space-between">
<field name="balance" no_label="1"/>
<field name="company_currency_id" invisible="1"/>
<field name="currency_id" groups="base.group_multi_currency" class="ms-2" invisible="not is_same_currency" options="{'no_create': True, 'no_open': True}"/>
<div invisible="is_same_currency" groups="base.group_multi_currency" class="d-flex gap-2">
(
<field name="amount_currency" class="w-50"/>
<field name="currency_id" no_label="1" class="w-50" placeholder="secondary currency" options="{'no_create': True, 'no_open': True}"/>
)
</div>
</div>
<field name="full_amount_switch_html" string="" widget="apply_amount_html" invisible="not reconciled_lines_excluding_exchange_diff_ids"/>
<field name="account_id" readonly="reconciled_lines_excluding_exchange_diff_ids or tax_line_id"/>
<field name="partner_id" readonly="reconciled_lines_excluding_exchange_diff_ids or tax_line_id"/>
<field name="name" readonly="reconciled_lines_excluding_exchange_diff_ids"/>
</group>
<group name="right_group">
<field name="date" readonly="True"/>
<field name="tax_ids" widget="many2many_tags" invisible="reconciled_lines_excluding_exchange_diff_ids or tax_line_id" context="{'append_fields': ['type_tax_use'], 'active_test': True}"/>
<field name="analytic_distribution" groups="analytic.group_analytic_accounting" widget="analytic_distribution"
options="{'account_field': 'account_id', 'business_domain': 'general'}"
/>
</group>
</group>
</sheet>
</form>
</field>
</record>
<record id="view_deferred_entries_tree" model="ir.ui.view">
<field name="name">account.move.line.deferral.entries.list</field>
<field name="model">account.move.line</field>
<field name="inherit_id" ref="account.view_move_line_tree"/>
<field name="mode">primary</field>
<field name="arch" type="xml">
<xpath expr="//list" position="attributes">
<attribute name="default_order">date</attribute>
</xpath>
<xpath expr="//field[@name='partner_id']" position="attributes">
<attribute name="optional">hide</attribute>
</xpath>
<xpath expr="//field[@name='tax_ids']" position="attributes">
<attribute name="optional">hide</attribute>
</xpath>
<xpath expr="//field[@name='amount_currency']" position="attributes">
<attribute name="optional">hide</attribute>
</xpath>
<xpath expr="//field[@name='analytic_distribution']" position="attributes">
<attribute name="optional">hide</attribute>
</xpath>
<xpath expr="//field[@name='matching_number']" position="attributes">
<attribute name="optional">hide</attribute>
</xpath>
<xpath expr="//field[@name='discount_date']" position="attributes">
<attribute name="column_invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='discount_amount_currency']" position="attributes">
<attribute name="column_invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='date_maturity']" position="attributes">
<attribute name="column_invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='residual_at_date']" position="attributes">
<attribute name="column_invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='residual_currency_at_date']" position="attributes">
<attribute name="column_invisible">1</attribute>
</xpath>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_account_payment_form_inherit_account_accountant" model="ir.ui.view">
<field name="name">account.payment.form.inherit.account_accountant</field>
<field name="model">account.payment</field>
<field name="inherit_id" ref="account.view_account_payment_form"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='button_open_journal_entry']" position="attributes">
<attribute name="groups">account.group_account_user</attribute>
</xpath>
<xpath expr="//field[@name='partner_bank_id'][last()]" position="after">
<field name="transaction_uuid" groups="base.group_no_one"/>
</xpath>
<!-- Stat button to open the manual reconciliation widget -->
<xpath expr="//div[@name='button_box']" position="inside">
<button name="action_open_manual_reconciliation_widget" type="object"
string="Payment Matching" class="oe_stat_button" icon="attach_money"
groups="account.group_account_user"
invisible="is_reconciled or not move_id or state not in ('reconciled', 'paid')"/>
</xpath>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,165 @@
<?xml version='1.0' encoding='utf-8'?>
<odoo>
<record id="view_account_move_line_reconcile_search" model="ir.ui.view">
<field name="name">account.move.line.reconcile.search</field>
<field name="model">account.move.line</field>
<field name="priority" eval="300"/>
<field name="arch" type="xml">
<search string="Search Journal Items to Reconcile">
<field name="name"
string="Journal Item"
filter_domain="['|', '|', '|', ('name', 'ilike', self), ('ref', 'ilike', self), ('account_id', 'ilike', self), ('partner_id', 'ilike', self)]"/>
<field name="name"/>
<field name="ref"/>
<field name="invoice_date"/>
<field name="date"/>
<field name="balance" string="Amount" filter_domain="['|', ('credit', '=', self), ('debit', '=', self)]"/>
<field name="account_id"/>
<field name="account_type"/>
<field name="partner_id"/>
<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)]"/>
<field name="tax_ids" />
<field name="tax_line_id" string="Originator Tax"/>
<field name="reconcile_model_id"/>
<separator/>
<filter string="Unreconciled"
domain="[('account_id.reconcile', '=', True), '|', ('matching_number', '=', False), ('matching_number', '=like', 'P%')]"
name="reconcilable_account"
help="Journal items where the account allows reconciliation no matter the residual amount"
/>
<filter string="With residual" domain="[('amount_residual', '!=', 0), ('account_id.reconcile', '=', True)]" help="Journal items where matching number isn't set" name="unreconciled"/>
<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"/>
<separator/>
<filter string="Posted" domain="[('parent_state', '=', 'posted')]" name="posted_lines"/>
<filter string="Unposted" domain="[('parent_state', '=', 'draft')]" name="unposted_lines"/>
<separator/>
<filter string="Date" name="date" date="date"/>
<filter string="Invoice Date" name="invoice_date" date="invoice_date"/>
<separator/>
<group>
<filter string="Journal Entry" name="group_by_move" domain="[]" context="{'group_by': 'move_name'}"/>
<filter string="Account" name="group_by_account" domain="[]" context="{'group_by': 'account_id'}"/>
<filter string="Partner" name="group_by_partner" domain="[]" context="{'group_by': 'partner_id'}"/>
<filter string="Journal" name="journal" domain="[]" context="{'group_by': 'journal_id'}"/>
<filter string="Date" name="groupby_date" domain="[]" context="{'group_by': 'date'}"/>
<filter string="Invoice Date" name="groupby_invoice_date" domain="[]" context="{'group_by': 'invoice_date'}"/>
</group>
</search>
</field>
</record>
<record id="view_move_line_reconcile_tree" model="ir.ui.view">
<field name="name">account.move.line.list.reconcile</field>
<field name="model">account.move.line</field>
<field name="arch" type="xml">
<list string="Journal Items" js_class="account_move_line_reconcile_list" create="false" edit="true" expand="context.get('expand', False)" multi_edit="1" sample="1">
<header>
<button name="action_reconcile" type="object" string="Reconcile" groups="account.group_account_user"/>
</header>
<field name="move_id" column_invisible="True"/>
<field name="invoice_date" string="Invoice Date" optional="hide"/>
<field name="date" readonly="1"/>
<field name="company_id" column_invisible="True"/>
<field name="company_id" groups="base.group_multi_company" readonly="1" optional="hide"/>
<field name="journal_id" readonly="1" options='{"no_open":True}' optional="hide"/>
<field name="move_name" string="Journal Entry" widget="open_move_widget"/>
<field name="account_id" options="{'no_open': True, 'no_create': True}" domain="[('company_ids', 'parent_of', company_id)]" groups="account.group_account_readonly" optional="hide"/>
<field name="partner_id" optional="hide" readonly="move_type != 'entry'"/>
<field name="ref" optional="hide" readonly="False"/>
<field name="product_id" readonly="1" optional="hide"/>
<field name="name" optional="show"/>
<field name="analytic_distribution" widget="analytic_distribution"
groups="analytic.group_analytic_accounting"
optional="show"
options="{'product_field': 'product_id', 'account_field': 'account_id', 'force_applicability': 'optional'}"/>
<field name="tax_ids" widget="many2many_tax_tags" optional="hide" readonly="1"/>
<field name="amount_currency" string="In Currency" groups="base.group_multi_currency" optional="show" readonly="1" invisible="is_same_currency"/>
<field name="currency_id" groups="base.group_multi_currency" optional="hide" string="Currency" readonly="1" invisible="is_same_currency"/>
<field name="debit" sum="Total Debit" readonly="1"/>
<field name="credit" sum="Total Credit" readonly="1"/>
<field name="tax_tag_ids" string="Tax Grids" options="{'no_create': True, 'no_create_edit': True}" widget="many2many_tags" optional="hide"/>
<field name="discount_date" string="Discount Date" optional="hide" />
<field name="discount_amount_currency" string="Discount Amount" optional="hide" />
<field name="tax_line_id" string="Originator Tax" optional="hide" readonly="1"/>
<field name="date_maturity" readonly="1" optional="hide"/>
<field name="balance" sum="Total Balance" optional="hide" readonly="1"/>
<field name="matching_number" string="Matching" readonly="1" optional="show" widget="matching_link_widget"/>
<field name="amount_residual" sum="Total Residual" string="Residual" optional="show" readonly="1" invisible="not is_account_reconcile"/>
<field name="amount_residual_currency" sum="Total Residual in Currency" string="Residual in Currency" optional="hide" readonly="1" invisible="is_same_currency or not is_account_reconcile" groups="base.group_multi_currency"/>
<field name="move_type" column_invisible="True"/>
<field name="parent_state" column_invisible="True"/>
<field name="account_type" column_invisible="True"/>
<field name="statement_line_id" column_invisible="True"/>
<field name="company_currency_id" column_invisible="True"/>
<field name="is_same_currency" column_invisible="True"/>
<field name="is_account_reconcile" column_invisible="True"/>
<field name="sequence" column_invisible="True"/>
</list>
</field>
</record>
<!-- Open the auto-reconcile wizard in modal -->
<record id="action_open_auto_reconcile_wizard" model="ir.actions.act_window">
<field name="name">Reconcile automatically</field>
<field name="res_model">account.auto.reconcile.wizard</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<!-- Open amls to reconcile in a view dedicated for reconciliation -->
<record id="action_move_line_posted_unreconciled" model="ir.actions.act_window">
<field name="name">Journal Items to reconcile</field>
<field name="res_model">account.move.line</field>
<field name="path">reconcile</field>
<field name="view_mode">list</field>
<field name="search_view_id" ref="view_account_move_line_reconcile_search"/>
<field name="view_id" ref="view_move_line_reconcile_tree"/>
<field name="domain">[('display_type', 'not in', ('line_section', 'line_subsection', 'line_note')), ('account_id.reconcile', '=', True), ('full_reconcile_id', '=', False), ('parent_state', '!=', 'cancel')]</field>
<field name="context">{'auto_statement_processing': True, 'journal_type': 'general', 'search_default_posted_lines': True, 'search_default_unreconciled': True, 'search_default_group_by_account': True, 'search_default_group_by_partner': True}</field>
</record>
<record id="account_accountant_view_account_reconcile_model_search" model="ir.ui.view">
<field name="name">account.reconcile.model.search</field>
<field name="model">account.reconcile.model</field>
<field name="inherit_id" ref="account.view_account_reconcile_model_search"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='name']" position="after">
<filter string="Created by User" name="created_by_user" domain="[('created_automatically', '=', False)]"/>
<filter string="Created Automatically" name="created_automatically" domain="[('created_automatically', '=', True)]"/>
</xpath>
</field>
</record>
<record id="view_account_reconcile_model_form" model="ir.ui.view">
<field name="name">account.reconcile.model.form</field>
<field name="model">account.reconcile.model</field>
<field name="inherit_id" ref="account.view_account_reconcile_model_form"/>
<field name="arch" type="xml">
<group id="counterpart_entry_right_column" position="inside">
<field name="is_asking_for_autopost" invisible="not created_automatically"/>
</group>
</field>
</record>
<record id="account.action_account_reconcile_model" model="ir.actions.act_window">
<field name="context">{'search_default_created_by_user':1}</field>
</record>
<record id="action_schedule_activity_bank_statement_line" model="ir.actions.server">
<field name="name">Activity</field>
<field name="model_id" ref="account.model_account_bank_statement_line"/>
<field name="binding_model_id" ref="account.model_account_bank_statement_line"/>
<field name="binding_view_types">kanban</field>
<field name="state">code</field>
<field name="code">
if records:
action = records.action_schedule_activity()
</field>
</record>
</odoo>

View File

@@ -0,0 +1,597 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="view_bank_statement_form_bank_rec_widget" model="ir.ui.view">
<field name="name">account.bank.statement.form.bank_rec_widget</field>
<field name="model">account.bank.statement</field>
<field name="priority">10</field>
<field name="arch" type="xml">
<form string="Bank Statement">
<header>
<button name="action_post" type="object" string="Post" class="btn-primary" invisible="is_statement_posted"/>
<button name="action_draft" type="object" string="Reset to draft" class="btn-secondary" invisible="not is_statement_posted or is_journal_hash"/>
</header>
<div class="alert alert-warning text-center" role="alert" invisible="is_valid and is_complete and (not context.get('at_creation') or not journal_has_invalid_statements)">
<div invisible="is_valid">The starting balance doesn't match the ending balance of the previous statement, or an earlier statement is missing.</div>
<div invisible="is_complete">The final calculated balance (<field name="balance_end"/>) doesn't match the specified ending balance.</div>
<div invisible="not context.get('at_creation') or not journal_has_invalid_statements">
There are one or more <a type="object" name="action_open_journal_invalid_statements" string="invalid statement(s)"/>
</div>
</div>
<sheet>
<div class="oe_button_box" name="button_box">
<button name="action_open_bank_reconcile_widget" type="object"
class="oe_stat_button" invisible="not line_ids">
<field name="line_ids" string="Transactions" widget="statinfo"/>
</button>
</div>
<group>
<field name="create_date" invisible="1"/>
<field name="is_valid" invisible="1"/>
<field name="is_complete" invisible="1"/>
<field name="currency_id" invisible="1"/>
<field name="journal_id" invisible="1"/>
<group>
<field name="name" required="1" />
<field name="date"/>
</group>
<group>
<field name="balance_start"/>
<field name="balance_end_real"/>
</group>
</group>
<notebook>
<page string="Statement Lines">
<field name="line_ids" context="{'default_journal_id': journal_id}">
<list editable="bottom">
<field name="date"/>
<field name="payment_ref" required="1"/>
<field name="partner_id" optional="hide"/>
<field name="journal_id" column_invisible="1"/>
<field name="account_number" optional="hide"/>
<field name="currency_id" column_invisible="1"/>
<field name="foreign_currency_id" optional="hide"/>
<field name="amount_currency" optional="hide" sum="Total"/>
<field name="amount" sum="Total"/>
<field name="reconcile_model_id" optional="show"/>
</list>
<kanban class="o_kanban_mobile">
<templates>
<t t-name="card">
<field name="currency_id" invisible="1"/>
<div class="row">
<field name="date" class="col-3"/>
<field name="payment_ref" class="col-5"/>
<field name="amount" class="col-4 text-end"/>
</div>
</t>
</templates>
</kanban>
</field>
</page>
</notebook>
</sheet>
<div class="o_attachment_preview"/>
<chatter/>
</form>
</field>
</record>
<record id="view_bank_create_statement_form_bank_rec_widget" model="ir.ui.view">
<field name="name">account.create.bank.statement.form.bank_rec_widget</field>
<field name="model">account.bank.statement</field>
<field name="arch" type="xml">
<form string="Bank Statement">
<div class="alert alert-warning text-center" role="alert" invisible="is_valid and is_complete">
<field name="problem_description"/>
</div>
<sheet>
<div class="oe_button_box" name="button_box">
<button name="action_open_bank_reconcile_widget" type="object" class="oe_stat_button" invisible="not line_ids">
<field name="line_ids" widget="statinfo" />
</button>
</div>
<group>
<field name="name" required="1" />
<field name="balance_start"/>
<field name="balance_end_real"/>
<field name="attachment_ids" widget="many2many_binary"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="action_bank_statement_form_bank_rec_widget" model="ir.actions.act_window">
<!-- Binding removed since the same can be achieved with multi-edit -->
<field name="name">Create Statement</field>
<field name="res_model">account.bank.statement</field>
<field name="view_mode">form</field>
<field name="view_id" ref="view_bank_create_statement_form_bank_rec_widget"/>
<field name="target">new</field>
<field name="context">{'dialog_size': 'medium', 'show_running_balance_latest': True, 'at_creation': True, 'from_bank_reco': True}</field>
</record>
<!-- Search view of the reconcile button -->
<record id="view_account_move_line_search_bank_rec_widget" model="ir.ui.view">
<field name="name">account.move.line.search.bank_rec_widget</field>
<field name="model">account.move.line</field>
<field name="priority">999</field>
<field name="arch" type="xml">
<search>
<field name="name"
string="Journal Item"
filter_domain="['|', '|', '|', '|', '|', ('name', 'ilike', self), ('ref', 'ilike', self), ('partner_id', 'ilike', self), ('amount_residual', 'ilike', self), ('amount_residual_currency', 'ilike', self), ('discount_amount_currency', 'ilike', self)]"/>
<field name="invoice_date"/>
<field name="date"/>
<field name="account_id"/>
<field name="partner_id"/>
<field name="journal_id"/>
<field name="currency_id" groups="base.group_multi_currency"/>
<field name="move_id"
string="Journal Entry"
filter_domain="['|', ('move_id.name', 'ilike', self), ('move_id.ref', 'ilike', self)]"/>
<separator/>
<filter name="amount_received" string="Incoming" domain="[('balance', '>', 0.0)]"/>
<filter name="amount_paid" string="Outgoing" domain="[('balance', '&lt;', 0.0)]"/>
<separator/>
<filter name="posted" string="Posted" domain="[('parent_state', '=', 'posted')]"/>
<filter name="draft" string="Draft" domain="[('parent_state', '=', 'draft')]"/>
<separator name="inject_after"/>
<filter name="date" string="Date" date="date"/>
<filter name="invoice_date" string="Invoice Date" date="invoice_date"/>
</search>
</field>
</record>
<!-- Search view on aml to be injected inside the form (view_bank_rec_widget_form) -->
<record id="view_bank_statement_line_search_bank_rec_widget" model="ir.ui.view">
<field name="name">account.bank.statement.line.search.bank_rec_widget</field>
<field name="model">account.bank.statement.line</field>
<field name="priority">999</field>
<field name="arch" type="xml">
<search>
<field name="name"
string="Transaction"
filter_domain="['|', '|', '|', '|', '|', '|', ('payment_ref', 'ilike', self), ('narration', 'ilike', self), ('partner_id', 'ilike', self), ('partner_name', 'ilike', self), ('partner_bank_id', 'ilike', self), ('account_number', 'ilike', self), ('amount', 'ilike', self)]"/>
<field name="id" invisible="1"/>
<field name="payment_ref"/>
<field name="date"/>
<field name="statement_id"/>
<field name="partner_id"/>
<field name="journal_id"
domain="[('type', 'in', ('bank', 'cash'))]"
invisible="context.get('default_journal_id')"/>
<field name="narration" string="Notes"/>
<field name="transaction_type"/>
<field name="amount"/>
<field name="is_reconciled"/>
<field name="move_id"
string="Journal Entry"
filter_domain="['|', ('move_id.name', 'ilike', self), ('move_id.ref', 'ilike', self)]"/>
<field name="statement_line_id" string="Statement Line"/>
<field name="activity_ids"/>
<separator/>
<filter name="cash_in" string="Cash In" domain="[('amount', '>', 0.0)]"/>
<filter name="cash_out" string="Cash Out" domain="[('amount', '&lt;', 0.0)]"/>
<separator/>
<filter name="to_check" string="To Review" domain="[('review_state', 'in', ('todo', 'anomaly'))]"/>
<filter name="statement_to_review" string="Statements to Review" domain="[('statement_id', 'in', context.get('review_statement_ids', []))]" invisible="True"/>
<separator/>
<filter name="no_statement" string="No statement" domain="[('statement_id', '=', False)]"/>
<filter name="invalid_statement" string="Invalid statements"
domain="[('statement_id', '!=', False), '|',('statement_complete', '=', False), ('statement_valid', '=', False)]"/>
<separator/>
<filter name="matched" string="Matched" domain="[('is_reconciled', '=', True)]"/>
<filter name="not_matched" string="Not Matched"
domain="[('is_reconciled', '=', False), ('review_state', 'not in', ('todo', 'anomaly'))]"/>
<filter name="with_activities" string="With Activities" domain="[('activity_ids', '!=', False)]"/>
<separator/>
<filter name="date" string="Date" date="date"/>
<separator/>
<filter name="statement_group" string="Statement" context="{'group_by': 'statement_id'}"/>
<filter name="journal_group" string="Journal" context="{'group_by': 'journal_id'}"/>
<filter name="date_group" string="Date" context="{'group_by': 'date'}"/>
<filter name="invoice_date_group" string="Invoice Date" domain="[]" context="{'group_by': 'invoice_date'}"/>
</search>
</field>
</record>
<!-- Kanban view on statement line injected inside the form (view_bank_rec_widget) -->
<record id="view_bank_statement_line_kanban_bank_rec_widget" model="ir.ui.view">
<field name="name">account.bank.statement.line.kanban.bank_rec_widget</field>
<field name="model">account.bank.statement.line</field>
<field name="arch" type="xml">
<kanban js_class="bank_rec_widget_kanban"
class="o_kanban_mobile"
on_create="quick_create"
quick_create_view="account_accountant.view_bank_statement_line_quick_create_form_bank_rec_widget">
<field name="id"/>
<field name="state"/>
<field name="statement_complete"/>
<field name="statement_valid"/>
<field name="statement_balance_end_real"/>
<field name="statement_name"/>
<field name="statement_problem_description"/>
<field name="journal_id"/>
<field name="statement_id"/>
<field name="is_reconciled"/>
<field name="review_state"/>
<field name="currency_id"/>
<field name="partner_id"/>
<field name="amount"/>
<field name="amount_currency"/>
<field name="date"/>
<field name="payment_ref"/>
<field name="move_id"/>
<field name="line_ids"/>
<field name="account_number"/>
<field name="activity_ids"/>
<field name="company_id"/>
<field name="partner_name"/>
<field name="transaction_details"/>
<field name="foreign_currency_id"/>
<field name="bank_statement_attachment_ids"/>
<templates>
<!-- We are overriding the whole kanban record element, but we still need to load the template
card. Look at the bank_reconciliation components to work on the view. -->
<t t-name="card"/>
</templates>
</kanban>
</field>
</record>
<record id="view_bank_statement_line_tree_bank_rec_widget" model="ir.ui.view">
<field name="name">account.bank.statement.line.list.bank_rec_widget</field>
<field name="model">account.bank.statement.line</field>
<field name="arch" type="xml">
<list editable="top"
multi_edit="1"
js_class="bank_rec_list"
decoration-muted="state == 'draft'"
default_order="internal_index desc">
<!--Invisible fields-->
<field name="statement_complete" column_invisible="True"/>
<field name="statement_valid" column_invisible="True"/>
<field name="is_reconciled" column_invisible="True"/>
<field name="review_state" column_invisible="True"/>
<field name="country_code" column_invisible="True"/>
<field name="currency_id" column_invisible="True"/>
<field name="company_id" column_invisible="True"/>
<!--Visible fields-->
<field name="sequence" widget="handle" column_invisible="True"/> <!--Until we add the JS class-->
<field name="date" readonly="is_reconciled and amount != 0"
options="{'warning': 'future'}"/>
<field name="move_id" optional="hidden" required="0"/>
<field name="payment_ref" required="1" readonly="is_reconciled and amount != 0"/>
<field name="partner_id" readonly="is_reconciled and amount != 0"/>
<field name="account_number" optional="hidden"/>
<field name="transaction_uuid" optional="hide" readonly="True"/>
<field name="narration"
string="Notes"
readonly="is_reconciled and amount != 0"
optional="hidden"/>
<field name="ref" readonly="is_reconciled and amount != 0" optional="hidden"/>
<field name="transaction_type" optional="hidden"/>
<field name="foreign_currency_id"
optional="hidden"
groups="base.group_multi_currency"
domain="[('id', '!=', currency_id)]"
options="{'no_open': True, 'no_create': True}"
readonly="is_reconciled and amount != 0"/>
<field name="amount_currency"
optional="hidden"
groups="base.group_multi_currency"
invisible="not foreign_currency_id"
readonly="is_reconciled and amount != 0"/>
<field name="amount" readonly="is_reconciled and amount != 0" />
<field name="journal_id"
domain="[('type', 'in', ['bank','cash'])]"
column_invisible="bool(context.get('default_journal_id'))"
readonly="(statement_id or is_reconciled) and amount != 0"/>
<field name="running_balance" class="oe_read_only"/>
<field name="statement_id"
optional="show"
options="{'no_quick_create': True}"
domain="['|',('journal_id', '=', journal_id),('journal_id', '=', False)]"
context="{
'default_journal_id':journal_id,
'form_view_ref': 'account_accountant.view_bank_statement_form_bank_rec_widget',
'st_line_id':id,
}"
decoration-danger="statement_complete == False or statement_valid == False"
widget="bank_rec_list_many2one_multi_id"
readonly="not id"/>
<field name="state"
optional="hide"
widget="badge"
decoration-info="state == 'draft'"
decoration-success="state == 'posted'"/>
<field name="transaction_details"
optional="hidden"
class="d-none d-md-block"
widget="formatted_transaction_details"/>
</list>
</field>
</record>
<!-- Form view for adding statement lines on the fly in a popup-->
<record id="view_bank_statement_line_form_bank_rec_widget" model="ir.ui.view">
<field name="name">account.bank.statement.line.form.bank_rec_widget</field>
<field name="model">account.bank.statement.line</field>
<field name="arch" type="xml">
<form string="New Transaction">
<header>
<button name="action_button_draft" type="object" class="btn btn-primary" string="Reset to Draft" invisible="state == 'draft'"/>
</header>
<field name="state" invisible="1"/>
<field name="statement_complete" invisible="1"/>
<field name="statement_valid" invisible="1"/>
<field name="is_reconciled" invisible="1"/>
<field name="suitable_journal_ids" invisible="1"/>
<field name="currency_id" invisible="1"/>
<field name="company_id" invisible="1"/>
<sheet>
<group>
<group>
<field name="date" readonly="is_reconciled and amount != 0"/>
<field name="payment_ref"
required="1"
readonly="is_reconciled and amount != 0"/>
<field name="partner_id"
readonly="is_reconciled and amount != 0"/>
</group>
<group>
<field name="amount" readonly="is_reconciled and amount != 0"/>
<field name="foreign_currency_id"
groups="base.group_multi_currency"
domain="[('id', '!=', currency_id)]"
options="{'no_open': True, 'no_create': True}"
readonly="is_reconciled and amount != 0"/>
<field name="amount_currency"
groups="base.group_multi_currency"
invisible="not foreign_currency_id"
readonly="is_reconciled and amount != 0"/>
<field name="journal_id"
domain="[('type', 'in', ['bank', 'cash'])]"
readonly="context.get('default_journal_id') or (is_reconciled and amount != 0)"/>
</group>
</group>
<footer>
<button string="Save &amp; Close" type="object"
name="action_save_close" class="btn btn-primary"
data-hotkey="q"/>
<button string="Save &amp; New" type="object"
name="action_save_new" class="btn btn-primary"
data-hotkey="n"/>
<button class="btn-secondary" special="cancel" data-hotkey="x"/>
</footer>
</sheet>
<chatter/>
</form>
</field>
</record>
<!-- Form view for quick creating statement lines -->
<record id="view_bank_statement_line_quick_create_form_bank_rec_widget" model="ir.ui.view">
<field name="name">account.bank.statement.line.form.bank_rec_widget</field>
<field name="model">account.bank.statement.line</field>
<field name="arch" type="xml">
<form string="New Transaction">
<field name="journal_id" invisible="1"/>
<field name="currency_id" invisible="1"/>
<group class="o_quick_create p-2">
<field name="date" class="w-100" nolabel="1"/>
<field name="payment_ref" class="w-100 o_payment_ref" required="1" nolabel="1" placeholder="Write a label ..."/>
<field name="partner_id" class="w-100" nolabel="1" placeholder="Partner"/>
<field name="amount" class="w-100" nolabel="1"/>
<field name="reconcile_model_id"
class="w-100"
nolabel="1"
placeholder="Reconciliation model"
domain="[('id', 'in', allowed_reconcile_model_ids)]"
options="{'no_create': True, 'no_open': True}"/>
</group>
</form>
</field>
</record>
<record id="action_bank_statement_line_form_bank_rec_widget" model="ir.actions.act_window">
<field name="name">New Transaction</field>
<field name="res_model">account.bank.statement.line</field>
<field name="view_mode">form</field>
<field name="view_id" ref="view_bank_statement_line_form_bank_rec_widget"/>
<field name="target">new</field>
</record>
<!--
The action record of Bank Reconciliation has a duplicate one below it with different view_mode (and path).
This was needed because the function "_action_open_bank_reconciliation_widget" was expected to return 2
different view_modes namely list,kanban and kanban,list depending on the boolean "kanban_first".
The solution of changing the action dict was not useful because the dict view_mode would be erased on page refresh.
-->
<record id="action_bank_statement_line_transactions" model="ir.actions.act_window">
<field name="name">Bank Matching</field>
<field name="res_model">account.bank.statement.line</field>
<field name="view_mode">list,kanban</field>
<field name="search_view_id" ref="view_bank_statement_line_search_bank_rec_widget"/>
<field name="view_id" ref="view_bank_statement_line_tree_bank_rec_widget"/>
<field name="path">reconciliation_list</field>
<field name="domain">[('state', '!=', 'cancel')]</field>
<field name="context">{
'bank_rec_widget': True,
'default_journal_id': active_id,
'search_default_journal_id': active_id
}</field>
<field name="help"/>
</record>
<record id="action_bank_statement_line_transactions_kanban" model="ir.actions.act_window">
<field name="name">Bank Matching</field>
<field name="res_model">account.bank.statement.line</field>
<field name="view_mode">kanban,list</field>
<field name="search_view_id" ref="view_bank_statement_line_search_bank_rec_widget"/>
<field name="view_id" ref="view_bank_statement_line_kanban_bank_rec_widget"/>
<field name="path">reconciliation</field>
<field name="domain">[('state', '!=', 'cancel')]</field>
<field name="context">{
'bank_rec_widget': True,
'default_journal_id': active_id,
'search_default_journal_id': active_id
}</field>
<field name="help"/>
</record>
<record id="view_move_form_bank_rec_widget" model="ir.ui.view">
<field name="name">account.move.form.bank_rec_widget</field>
<field name="model">account.move</field>
<field name="priority">999</field>
<field name="arch" type="xml">
<form>
<chatter/>
</form>
</field>
</record>
<!-- List view of aml used in the reconcile search more (bank rec widget) -->
<record id="view_account_move_line_list_bank_rec_widget" model="ir.ui.view">
<field name="name">account.move.line.list.bank_rec_widget</field>
<field name="model">account.move.line</field>
<field name="priority">999</field>
<field name="arch" type="xml">
<list js_class="bank_rec_dialog_list" string="Journal Items to Match" create="false" edit="false" decoration-info="parent_state == 'draft'">
<field name="date"/>
<field name="move_name" string="Journal Entry" optional="show"/>
<field name="account_id" optional="hidden"/>
<field name="journal_id" optional="hidden"/>
<field name="partner_id" optional="show"/>
<field name="invoice_date" string="Invoice Date" optional="hide"/>
<field name="name" optional="show"/>
<field name="date_maturity" optional="hidden"/>
<field name="ref" optional="hidden"/>
<field name="analytic_distribution" groups="analytic.group_analytic_accounting" widget="analytic_distribution" optional="hidden" options="{'account_field': 'account_id', 'business_domain': 'general'}"/>
<field name="amount_residual" invisible="currency_id == company_currency_id" decoration-muted="amount_residual &lt; 0" nolabel="1" />
<field name="company_currency_id" column_invisible="True"/>
<field name="amount_residual_currency" decoration-muted="amount_residual_currency &lt; 0" string="Amount Due"/>
<field name="currency_id" column_invisible="True"/>
<field name="move_id" column_invisible="True"/>
</list>
</field>
</record>
<!-- Kanban view of aml used in the reconcile search more (bank rec widget) -->
<record id="view_account_move_line_kanban_bank_rec_widget" model="ir.ui.view">
<field name="name">account.move.line.kanban.bank_rec_widget</field>
<field name="model">account.move.line</field>
<field name="priority">999</field>
<field name="arch" type="xml">
<kanban js_class="bank_rec_dialog_kanban" class="o_kanban_mobile" create="false" group_create="false">
<field name="currency_id"/>
<field name="company_currency_id"/>
<templates>
<t t-name="card" class="px-3">
<div class="d-flex justify-content-between mb-2">
<field name="move_name"/>
<div t-if="record.date.raw_value" class="fw-bold">
<field name="date"/>
</div>
</div>
<div class="o_bank_rec_ref fst-italic w-50">
<field name="ref"/>
</div>
<div class="d-flex align-items-end justify-content-between">
<field name="partner_id"/>
<div class="d-flex flex-column align-items-end"
t-attf-class="{{ record.amount_residual_currency.raw_value &lt; 0 ? 'text-muted' : '' }}">
<field name="amount_residual" invisible="currency_id == company_currency_id"/>
<field name="amount_residual_currency"/>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<!-- List view of aml used in the set account search (bank rec widget) -->
<record id="view_account_list_bank_rec_widget" model="ir.ui.view">
<field name="name">account.account.list.bank.rec.widget</field>
<field name="model">account.account</field>
<field name="arch" type="xml">
<list string="Account" create="false" edit="false">
<field name="code" groups="account.group_account_readonly"/>
<field name="name" optional="show"/>
<field name="description" optional="show" width="350px"/>
<field name="account_type" optional="hide"/>
<field name="reconcile" string="Reconcile" optional="hide"/>
</list>
</field>
</record>
<record id="view_account_search_bank_rec_widget" model="ir.ui.view">
<field name="name">account.account.search.bank.rec.widget</field>
<field name="model">account.account</field>
<field name="inherit_id" ref="account.view_account_search"/>
<field name="mode">primary</field>
<field name="arch" type="xml">
<field name="name" position="after">
<filter invisible="1" name="bankrec_income" string="Income" domain="[('account_type', '=', 'income')]"/>
<filter invisible="1" name="bankrec_expense" string="Expenses" domain="[('account_type', '=', 'expense')]"/>
<filter invisible="1" name="bankrec_currentasset" string="Current Assets" domain="[('account_type', '=', 'asset_current')]"/>
</field>
</field>
</record>
<!-- Add bank recon widget to the statements list view -->
<record id="view_bank_statement_tree" model="ir.ui.view">
<field name="name">account.bank.statement.list</field>
<field name="model">account.bank.statement</field>
<field name="inherit_id" ref="account.view_bank_statement_tree"/>
<field name="arch" type="xml">
<list position="attributes">
<attribute name="create">1</attribute>
</list>
<list position="inside">
<button name="action_open_bank_reconcile_widget" string="Transactions" type="object"/>
</list>
</field>
</record>
<record model="ir.actions.server" id="action_bank_statement_attachment">
<field name="name">Statement</field>
<field name="model_id" ref="model_account_bank_statement"/>
<field name="binding_model_id" ref="model_account_bank_statement" />
<field name="binding_type">report</field>
<field name="state">code</field>
<field name="code">
if records:
action = records.action_generate_attachment()
</field>
</record>
<record id="model_account_statement_line_button_draft" model="ir.actions.server">
<field name="name">Reset to draft</field>
<field name="model_id" ref="model_account_bank_statement_line"/>
<field name="binding_model_id" ref="model_account_bank_statement_line" />
<field name="binding_view_types">list</field>
<field name="state">code</field>
<field name="code">
if records:
action = records.action_button_draft()
</field>
</record>
<record id="action_download_attachments" model="ir.actions.server">
<field name="name">Download Attachments</field>
<field name="model_id" ref="model_account_bank_statement_line"/>
<field name="binding_model_id" ref="model_account_bank_statement_line" />
<field name="binding_view_types">list</field>
<field name="state">code</field>
<field name="code">
if records:
action = records.action_download_attachments()
</field>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,14 @@
<?xml version='1.0' encoding='utf-8'?>
<odoo>
<record id="digest_digest_view_form" model="ir.ui.view">
<field name="name">digest.digest.view.form.inherit.account.accountant</field>
<field name="model">digest.digest</field>
<field name="priority">35</field>
<field name="inherit_id" ref="digest.digest_digest_view_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='kpi_account_total_revenue']" position="after">
<field name="kpi_account_bank_cash"/>
</xpath>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="res_partner_view_form" model="ir.ui.view">
<field name="name">res.partner.form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="account.view_partner_property_form"/>
<field name="arch" type="xml">
<xpath expr="//group[@name='general']" position="attributes">
<attribute name="groups" separator="," add="account.group_account_basic"/>
</xpath>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="report_invoice_document" inherit_id="account.report_invoice_document">
<div id="right-elements" position="inside">
<div t-if="o.show_signature_area" t-attf-class="#{'col-12' if report_type != 'html' else 'col-lg-5 offset-lg-7 col-md-12'}">
<t t-if="o.signature">
<img t-if="o.signature" t-att-src="image_data_uri(o.signature)" class="img-fluid mx-auto" style="max-height: 6rem;"/>
</t>
<t t-else="">
<!-- leave an empty space allowing to sign the invoice manually -->
<div class="col-12" style="min-height: 10rem"/>
</t>
<!-- wkhtmltopdf doesn't render a simple `border-top border-dark` -->
<p class="mx-auto text-center" style="border-top: thin solid;">Authorized signatory</p>
</div>
</div>
</template>
</odoo>

View File

@@ -0,0 +1,130 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.account.accountant</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="account.res_config_settings_view_form"/>
<field name="arch" type="xml">
<setting id="fiscalyear" position="replace">
<setting id="fiscalyear" string="Fiscal Year">
<div class="content-group">
<div class="d-flex mt16 align-items-baseline">
<label for="fiscalyear_last_month" string="Last Day" class="col-lg-3 o_light_label pe-2 pe-lg-0"/>
<div class="col-lg-9">
<field name="fiscalyear_last_month" class="pe-2"/>
<field name="fiscalyear_last_day"/>
</div>
</div>
</div>
</setting>
<setting groups="account.group_account_manager" help="All entries created by Invoicing before that date will be ignored in Accounting.">
<field name="invoicing_switch_threshold"/>
</setting>
<setting help="Define fiscal years of more or less than one year">
<field name="group_fiscal_year"/>
<div class="mt16">
<button name="%(account_accountant.actions_account_fiscal_year)d" icon="east"
type="action" string="Fiscal Years" class="btn-link"
invisible="not group_fiscal_year"/>
</div>
</setting>
</setting>
<block id="bank_cash" position="inside">
<setting groups="account.group_account_manager" help="Enable Auto Transfers ">
<field name="module_account_transfer" widget="upgrade_boolean"/>
</setting>
</block>
<block id="invoicing_settings" position="inside">
<setting company_dependent="1" help="To enhance authenticity, add a signature to your invoices">
<field name="sign_invoice"/>
<label for="signing_user" string="Legal signatory" class="col-lg-5 o_light_label" invisible="not sign_invoice"/>
<field name="signing_user" invisible="not sign_invoice"/>
</setting>
</block>
<setting id="post_bank_transactions_and_payments_setting" position="after">
<setting string="Deferred expense entries:"
company_dependent="1"
documentation="/applications/finance/accounting/vendor_bills/deferred_expenses.html">
<div class="content-group">
<div class="row mt8">
<label for="deferred_expense_journal_id" class="col-lg-5 o_light_label" string="Journal"/>
<field name="deferred_expense_journal_id" domain="[('type', '=', 'general'), ('active', '=', True)]"/>
</div>
<div class="row mt8">
<label for="deferred_expense_account_id" class="col-lg-5 o_light_label" string="Account"/>
<field name="deferred_expense_account_id" domain="[('account_type', 'in', ('asset_current', 'asset_prepayments'))]" decoration-muted="not deferred_expense_account_active"/>
</div>
<div class="row mt8">
<label for="generate_deferred_expense_entries_method" class="col-lg-5 o_light_label" string="Generate Entries"/>
<field name="generate_deferred_expense_entries_method"/>
</div>
<div class="row mt8" invisible="generate_deferred_expense_entries_method != 'on_validation'">
<label for="deferred_expense_periodicity" class="col-lg-5 o_light_label" string="Periodicity"/>
<field name="deferred_expense_periodicity"/>
</div>
<div class="row mt8">
<label for="deferred_expense_amount_computation_method" class="col-lg-5 o_light_label" string="Computation"/>
<field name="deferred_expense_amount_computation_method"/>
</div>
</div>
</setting>
<setting string="Deferred revenue entries:"
company_dependent="1"
documentation="/applications/finance/accounting/customer_invoices/deferred_revenues.html">
<div class="content-group">
<div class="row mt8">
<label for="deferred_revenue_journal_id" class="col-lg-5 o_light_label" string="Journal"/>
<field name="deferred_revenue_journal_id" domain="[('type', '=', 'general'), ('active', '=', True)]"/>
</div>
<div class="row mt8">
<label for="deferred_revenue_account_id" class="col-lg-5 o_light_label" string="Account"/>
<field name="deferred_revenue_account_id" domain="[('account_type', '=', 'liability_current')]" decoration-muted="not deferred_revenue_account_active"/>
</div>
<div class="row mt8">
<label for="generate_deferred_revenue_entries_method" class="col-lg-5 o_light_label" string="Generate Entries"/>
<field name="generate_deferred_revenue_entries_method"/>
</div>
<div class="row mt8" invisible="generate_deferred_revenue_entries_method != 'on_validation'">
<label for="deferred_revenue_periodicity" class="col-lg-5 o_light_label" string="Periodicity"/>
<field name="deferred_revenue_periodicity"/>
</div>
<div class="row mt8">
<label for="deferred_revenue_amount_computation_method" class="col-lg-5 o_light_label" string="Computation"/>
<field name="deferred_revenue_amount_computation_method"/>
</div>
</div>
</setting>
</setting>
<xpath expr="//block[@id='default_accounts']" position="after">
<block title="Inventory Valuation" id="account_inventory_valuation">
<setting id="account_stock_valuation_accounts" string="Inventory Accounting" company_dependent="1">
<div class="content-group">
<div class="row mt8">
<label for="valuation_method" class="col-lg-5 o_light_label"/>
<field name="valuation_method"/>
</div>
<div class="row mt8">
<label for="cost_method" class="col-lg-5 o_light_label"/>
<field name="cost_method"/>
</div>
<div class="row mt8">
<label for="inventory_period" string="Periodic Valuation" class="col-lg-5 o_light_label"/>
<field name="inventory_period"/>
</div>
<div class="row mt8">
<label for="stock_valuation_account_id" class="col-lg-5 o_light_label"/>
<field name="stock_valuation_account_id" decoration-muted="not stock_valuation_account_active"/>
</div>
<div class="row mt8">
<label for="stock_journal_id" string="Journal" class="col-lg-5 o_light_label"/>
<field name="stock_journal_id"/>
</div>
</div>
</setting>
</block>
</xpath>
</field>
</record>
</odoo>