accountant_cn

This commit is contained in:
2026-11-17 17:57:08 +08:00
parent 9b924747c5
commit 5fc4382687
771 changed files with 18102 additions and 820280 deletions

View File

@@ -0,0 +1,460 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<menuitem id="menu_accounting"
name="Accounting"
groups="account.group_account_readonly,account.group_account_invoice"
web_icon="dn_account_full_menu,static/description/icon.png"
sequence="55"/>
<!-- ================== move the community branches ================== -->
<record id="account.menu_board_journal_1" model="ir.ui.menu">
<field name="parent_id" ref="menu_accounting"/>
<field name="sequence">1</field>
</record>
<record id="account.menu_finance_receivables" model="ir.ui.menu">
<field name="parent_id" ref="menu_accounting"/>
<field name="sequence">2</field>
</record>
<record id="account.menu_finance_payables" model="ir.ui.menu">
<field name="parent_id" ref="menu_accounting"/>
<field name="sequence">3</field>
</record>
<record id="account.menu_finance_entries" model="ir.ui.menu">
<field name="parent_id" ref="menu_accounting"/>
<field name="sequence">4</field>
</record>
<record id="account.account_audit_menu" model="ir.ui.menu">
<field name="parent_id" ref="menu_accounting"/>
<field name="sequence">5</field>
</record>
<record id="account.menu_finance_reports" model="ir.ui.menu">
<field name="parent_id" ref="menu_accounting"/>
<field name="sequence">6</field>
</record>
<record id="account.menu_finance_configuration" model="ir.ui.menu">
<field name="parent_id" ref="menu_accounting"/>
<field name="sequence">7</field>
</record>
<!-- The community "Invoicing" root is now empty: every branch it used to
hold was re-parented above. Enterprise leaves it behind as a blank
app tile; on a Community database that reads as a bug ("a second
accounting app with nothing in it"), so we archive it. The menu record
still exists, it is simply not rendered.
Re-activate it from Settings > Technical > User Interface > Menu Items
if you ever want the flat Invoicing app back. -->
<record id="account.menu_finance" model="ir.ui.menu">
<field name="active" eval="False"/>
</record>
<!-- ============================================================= -->
<!-- ACCOUNTING > ASSETS & LIABILITIES -->
<!-- Enterprise: accountant/views/accountant_menuitem.xml -->
<!-- ============================================================= -->
<menuitem id="account_assets_liabilities_menu"
name="Assets &amp; Liabilities"
parent="account.menu_finance_entries"
sequence="10"/>
<!-- Enterprise fills this group from `account_asset` (a full asset register
with a depreciation board per record), which does not exist in
Community. Rather than pointing "Assets" at a miscellaneous journal
(which shows every entry, not the assets), we expose the journal items
that actually sit on a Fixed Assets account. It is the same population
Enterprise's register posts to, and it keeps the menu where users
expect it. Sequence 60 matches `account_asset/data/menuitems.xml`. -->
<record id="action_dn_fixed_assets" model="ir.actions.act_window">
<field name="name">Assets</field>
<field name="res_model">account.move.line</field>
<field name="path">assets</field>
<field name="view_mode">list,pivot,graph</field>
<field name="domain">[
('display_type', 'not in', ('line_section', 'line_subsection', 'line_note')),
('account_id.account_type', 'in', ('asset_fixed', 'asset_non_current')),
]</field>
<field name="context">{'search_default_group_by_account': 1, 'search_default_posted': 1}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">No asset entries yet</p>
<p>Every journal item booked on a Fixed Assets account shows up here,
together with the depreciation charged against it.</p>
</field>
</record>
<menuitem id="menu_assets_fixed"
name="Assets"
parent="account_assets_liabilities_menu"
action="action_dn_fixed_assets"
sequence="60"/>
<!-- ============================================================= -->
<!-- REPORTING > STATEMENT REPORTS -->
<!-- Enterprise: accountant_menuitem.xml + account_asset/data/menuitems.xml -->
<!-- ============================================================= -->
<menuitem id="menu_report_balance_sheet"
name="Balance Sheet"
parent="account.account_reports_legal_statements_menu"
action="accountant_cn.action_dn_fr_bs"
groups="account.group_account_readonly,account.group_account_basic"
sequence="10"/>
<menuitem id="menu_report_profit_loss"
name="Profit and Loss"
parent="account.account_reports_legal_statements_menu"
action="accountant_cn.action_dn_fr_pl"
groups="account.group_account_readonly,account.group_account_basic"
sequence="15"/>
<menuitem id="menu_report_depreciation"
name="Depreciation Schedule"
parent="account.account_reports_legal_statements_menu"
action="accountant_cn.action_dn_fr_depreciation"
groups="account.group_account_readonly"
sequence="20"/>
<menuitem id="menu_report_cash_flow"
name="Cash Flow Statement"
parent="account.account_reports_legal_statements_menu"
action="accountant_cn.action_dn_fr_cf"
groups="account.group_account_readonly,account.group_account_basic"
sequence="30"/>
<menuitem id="menu_report_annual"
name="Annual Statements"
parent="account.account_reports_legal_statements_menu"
action="accountant_cn.action_dn_fr_annual"
groups="account.group_account_readonly,account.group_account_basic"
sequence="40"/>
<!-- ============================================================= -->
<!-- REPORTING > LEDGERS -->
<!-- Enterprise: accountant_menuitem.xml, `account_reports_audit_menu` -->
<!-- Only two entries: Journal Audit lives under Review > Control. -->
<!-- ============================================================= -->
<menuitem id="account_reports_audit_menu"
name="Ledgers"
parent="account.menu_finance_reports"
sequence="2">
<menuitem id="menu_report_trial_balance"
name="Trial Balance"
action="accountant_cn.action_dn_fr_tb"
groups="account.group_account_readonly,account.group_account_basic"
sequence="10"/>
<menuitem id="menu_report_general_ledger"
name="General Ledger"
action="accountant_cn.action_dn_fr_gl"
groups="account.group_account_readonly,account.group_account_basic"
sequence="20"/>
</menuitem>
<!-- ============================================================= -->
<!-- REPORTING > PARTNER REPORTS (was an empty group) -->
<!-- ============================================================= -->
<menuitem id="menu_report_partner_ledger"
name="Partner Ledger"
parent="account.account_reports_partners_reports_menu"
action="accountant_cn.action_dn_fr_partner"
groups="account.group_account_readonly,account.group_account_basic"
sequence="10"/>
<menuitem id="menu_report_customer_statement"
name="Customer Statement"
parent="account.account_reports_partners_reports_menu"
action="accountant_cn.action_dn_fr_statement"
groups="account.group_account_readonly,account.group_account_basic"
sequence="20"/>
<menuitem id="menu_report_aged_receivable"
name="Aged Receivable"
parent="account.account_reports_partners_reports_menu"
action="accountant_cn.action_dn_fr_ar"
groups="account.group_account_readonly,account.group_account_basic"
sequence="30"/>
<menuitem id="menu_report_aged_payable"
name="Aged Payable"
parent="account.account_reports_partners_reports_menu"
action="accountant_cn.action_dn_fr_ap"
groups="account.group_account_readonly,account.group_account_basic"
sequence="40"/>
<menuitem id="menu_report_open_items"
name="Open Items"
parent="account.account_reports_partners_reports_menu"
action="accountant_cn.action_dn_fr_open_items"
groups="account.group_account_readonly,account.group_account_basic"
sequence="50"/>
<!-- ============================================================= -->
<!-- REPORTING > TAXES & FISCAL (was an empty group) -->
<!-- ============================================================= -->
<menuitem id="menu_report_tax"
name="Tax Report"
parent="account.account_reports_taxes_and_fiscal_menu"
action="accountant_cn.action_dn_fr_tax"
groups="account.group_account_readonly,account.group_account_basic"
sequence="10"/>
<menuitem id="menu_report_sales"
name="Sales Analysis"
parent="account.account_reports_taxes_and_fiscal_menu"
action="accountant_cn.action_dn_fr_sales"
groups="account.group_account_readonly,account.group_account_basic"
sequence="20"/>
<!-- ============================================================= -->
<!-- REPORTING > MANAGEMENT (adds to the community entries) -->
<!-- ============================================================= -->
<menuitem id="menu_report_exec_summary"
name="Executive Summary"
parent="account.account_reports_management_menu"
action="accountant_cn.action_dn_fr_exec"
groups="account.group_account_readonly,account.group_account_basic"
sequence="1"/>
<menuitem id="menu_report_interco"
name="Intercompany Comparison"
parent="account.account_reports_management_menu"
action="accountant_cn.action_dn_fr_interco"
groups="account.group_account_readonly,account.group_account_basic"
sequence="40"/>
<!-- ============================================================= -->
<!-- REVIEW -->
<!-- Enterprise: account_menuitem.xml (Control) -->
<!-- account_reports/data/menuitems.xml (the rest) -->
<!-- ============================================================= -->
<!-- Review > Control. Journal Audit is a control report, not a ledger:
Enterprise keeps it here (account_reports/data/menuitems.xml:18) with
sequence 10, next to the audit trail. The audit trail itself has no
sequence in Enterprise, which makes it sort last; we give it an
explicit 20 so the order does not depend on the creation id. -->
<menuitem id="menu_report_journal_audit"
name="Journal Audit"
parent="account.account_audit_control_menu"
action="accountant_cn.action_dn_fr_journal"
groups="account.group_account_readonly"
sequence="10"/>
<record id="account.account_audit_trail_menu" model="ir.ui.menu">
<field name="sequence">20</field>
</record>
<!-- Review > Audit > Working Files.
Enterprise backs this with `account.return` (period review files with a
full state machine). Community has no such model and the review
workflow is a separate feature, so the menu is created here to keep the
tree identical, and it opens the journal items that still need a
decision. That is the entry point people actually need from this group:
what is left to look at before closing the period. -->
<record id="action_dn_working_files" model="ir.actions.act_window">
<field name="name">Working Files</field>
<field name="res_model">account.move.line</field>
<field name="view_mode">list,pivot</field>
<field name="domain">[
('parent_state', '=', 'posted'),
('display_type', 'not in', ('line_section', 'line_subsection', 'line_note')),
('account_id.account_type', 'in', (
'asset_receivable', 'liability_payable',
'asset_cash', 'liability_credit_card',
)),
('full_reconcile_id', '=', False),
]</field>
<field name="context">{'search_default_group_by_account': 1}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">Nothing left to review</p>
<p>Journal items still open on a reconciliation account show up here:
receivables, payables and cash that have not been matched yet.</p>
</field>
</record>
<menuitem id="account_audit_working_file_menu"
parent="account.account_audit_menu"
name="Audit"
sequence="30"
groups="account.group_account_readonly">
<menuitem id="menu_action_working_files"
name="Working Files"
action="action_dn_working_files"/>
</menuitem>
<!-- Review > Inventory. Enterprise fills this group with "Inventory
Valuation" (account_reports); the community `account` module already
ships that report as a client action, so we mount it directly. -->
<menuitem id="account_audit_inventory_entries_menu"
parent="account.account_audit_menu"
name="Inventory"
sequence="40"
groups="account.group_account_readonly">
<menuitem id="menu_report_stock_valuation"
name="Inventory Valuation"
action="account.action_report_stock_valuation"
groups="account.group_account_readonly"
sequence="10"/>
</menuitem>
<!-- Review > Regularization Entries.
Enterprise has exactly three entries here: Unrealized Currencies,
Deferred Revenues and Deferred Expenses. We used to ship a combined
"Deferred Revenues and Expenses" report (one menu entry instead of two)
and an extra "Bank Reconciliation Status" that Enterprise does not have
in this group at all, so both are corrected. -->
<menuitem id="account_audit_regularization_entries_menu"
parent="account.account_audit_menu"
name="Regularization Entries"
sequence="50"
groups="account.group_account_readonly">
<menuitem id="menu_report_fx"
name="Unrealized Currencies"
action="accountant_cn.action_dn_fr_fx"
groups="account.group_account_readonly"
sequence="10"/>
<menuitem id="menu_report_deferred_revenue"
name="Deferred Revenues"
action="accountant_cn.action_dn_fr_deferred_revenue"
groups="account.group_account_readonly"
sequence="20"/>
<menuitem id="menu_report_deferred_expense"
name="Deferred Expenses"
action="accountant_cn.action_dn_fr_deferred_expense"
groups="account.group_account_readonly"
sequence="30"/>
</menuitem>
<!-- ============================================================= -->
<!-- ACCOUNTING > CLOSING -->
<!-- Enterprise: account_menuitem.xml creates the group empty and -->
<!-- these modules fill it: -->
<!-- account_accountant Reconcile seq 65 -->
<!-- account_reports Tax Returns seq 67 -->
<!-- account_accountant Lock Dates… seq 70 -->
<!-- account Secure Entries seq 80 -->
<!-- Community already ships "Secure Entries" there. -->
<!-- ============================================================= -->
<!-- Reconcile: the journal items still open on a reconciliation account.
Enterprise opens its full reconciliation widget from here; Community
has the same model but no matching widget, so this lists exactly the
items that widget would show. -->
<record id="action_dn_reconcile" model="ir.actions.act_window">
<field name="name">Journal Items to reconcile</field>
<field name="res_model">account.move.line</field>
<field name="view_mode">list</field>
<field name="domain">[
('display_type', 'not in', ('line_section', 'line_subsection', 'line_note')),
('account_id.reconcile', '=', True),
('full_reconcile_id', '=', False),
('parent_state', '=', 'posted'),
]</field>
<field name="context">{'search_default_group_by_account': 1, 'search_default_group_by_partner': 1}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">Everything is reconciled</p>
<p>Posted journal items on a reconciliation account that still have no
matching number show up here.</p>
</field>
</record>
<menuitem id="menu_account_reconcile"
name="Reconcile"
parent="account.account_closing_menu"
action="action_dn_reconcile"
sequence="65"
groups="account.group_account_user"/>
<!-- Lock Dates…: the period locking wizard of dn_accounting, which is the
Community equivalent of Enterprise's `account.change.lock.date`. -->
<menuitem id="menu_dn_lock_date_in_closing"
name="Lock Dates…"
parent="account.account_closing_menu"
action="accountant_cn.action_dn_lock_date_wizard"
sequence="70"
groups="account.group_account_manager"/>
<!-- The two period-management groups belong under Closing, not under
Accounting: Enterprise has no separate top-level entries for them, and
closing the period is literally what they do. -->
<record id="accountant_cn.menu_dn_bank_rec_root" model="ir.ui.menu">
<field name="parent_id" ref="account.account_closing_menu"/>
<field name="sequence">35</field>
</record>
<record id="accountant_cn.menu_dn_accounting_root" model="ir.ui.menu">
<field name="parent_id" ref="account.account_closing_menu"/>
<field name="sequence">40</field>
</record>
<!-- Two menu records from the previous layout are gone for good. They are
deleted rather than reassigned because keeping them would leave a
duplicate entry in the tree: Odoo never removes an `ir.ui.menu` whose
XML declaration disappears, it only stops updating it.
* `menu_report_deferred` — replaced by the two separate Deferred
Revenues / Deferred Expenses entries Enterprise ships.
* `menu_report_bankrec_status` — Enterprise has no such entry under
Regularization Entries; the reconciliation workspace lives under
Closing > Bank Reconciliation instead. -->
<delete model="ir.ui.menu" id="menu_report_deferred"/>
<delete model="ir.ui.menu" id="menu_report_bankrec_status"/>
<!-- ============================================================= -->
<!-- CONFIGURATION -->
<!-- ============================================================= -->
<menuitem id="account.menu_account_config"
name="Settings"
parent="account.menu_finance_configuration"
sequence="0"
groups="base.group_system"/>
<!-- Community creates `account_report_folder` ("Reporting") under
Configuration > Accounting but never puts anything in it: Enterprise
uses it for the report designer and the report line definitions.
We park our own report configuration there, which also removes the two
entries that used to sit flat next to "Taxes" and "Journals". -->
<record id="account.account_report_folder" model="ir.ui.menu">
<field name="name">Reporting</field>
<field name="sequence">4</field>
</record>
<record id="accountant_cn.menu_dn_fr_config" model="ir.ui.menu">
<field name="parent_id" ref="account.account_report_folder"/>
<field name="sequence">10</field>
</record>
<record id="accountant_cn.menu_dn_fr_external_value" model="ir.ui.menu">
<field name="parent_id" ref="account.account_report_folder"/>
<field name="sequence">20</field>
</record>
<record id="accountant_cn.menu_dn_report_config" model="ir.ui.menu">
<field name="parent_id" ref="account.account_report_folder"/>
<field name="name">DN Report Builder</field>
<field name="sequence">30</field>
</record>
</odoo>