The aim of this commit is to simplify and standardize the settings archs.
To do this, a small DSL exclusively for the settings was created. This
new DSL introduces 3 tags: `app`, `block` and `setting`.
The `app` tag is used to declare the application on the settings view.
It creates an entry with its logo on the sidebar of the view. It also
acts as delimiter when searching.
```xml
<app string="CRM" name="crm">
...
</app>
```
- `string` : The "display" name of the application.
- `name` : The technical name of the application (the name of the module).
- `logo` *optional* : The relative path to the logo. If not set, the
logo is created using the `name` parameter :
`/{name}/static/description/icon.png`.
The `block` tag is used to declare a group of settings. This group can
have a title and a description/help.
```xml
<block title="Title of group Bar">
...
</block>
```
- `title` *optional* : The title of the block of settings (the old h2),
you can perform research on its text.
- `help` *optional* : The description/help of the block of settings
(the old h3), you can perform research on its text.
The `setting` tag is used to declare the setting itself. The first field
in the setting is used as the main field (optional). This field is
placed on the left panel (if it's a boolean field) or on the top of the
right panel (otherwise). The field is also used to create the setting
label if a `string` is not defined. The `setting` tag can also contain
more elements (e.g. html), all of these elements are rendered in the
right panel.
```xml
<setting string="this is bar">
<field name="bar"/>
...More elements
</setting>
```
- `type` *optional* : By default, a setting is visually separated on two
panels (left and right), and is used to edit a given field. By
defining `type='header'`, a special kind of setting is rendered
instead. This setting is used to modify the scope of the other
settings. For example, on the website application, this setting
is used to indicate to which website the other settings apply.
The header setting is visually represented as a yellow banner on
the top of the screen.
- `string` *optional* : The text used as label of the setting. If it's
not defined, the first field is used as label.
- `title` *optional* : The text used as tooltip.
- `help` *optional* : The help/description of the setting. This text is
displayed just below the setting label (with classname
`text-muted`).
- `company_dependent` *optional* : If this attribute is set to "1" an
icon is displayed next to the setting label to explicit that
this setting is company-specific.
- `documentation` *optional* : If this attribute is set, an icon is
added next to the setting label, this icon is a link to the
documentation. Note that you can use relative or absolute path.
The relative path is relative to
`https://www.odoo.com/documentation/server_version`, so it's not
necessary to hard-code the server version on the arch anymore.
closes odoo/odoo#106425
Task-id: 3081367
Related: odoo/enterprise#34337
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: "Michael Mattiello (mcm)" <mcm@odoo.com>
342 lines
28 KiB
XML
342 lines
28 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
<record id="open_account_charts_modules" model="ir.actions.act_window">
|
|
<field name="name">Chart Templates</field>
|
|
<field name="res_model">ir.module.module</field>
|
|
<field name="view_mode">kanban,tree,form</field>
|
|
<field name="context" eval="{
|
|
'search_default_category_id': ref('base.module_category_accounting_localizations_account_charts'),
|
|
'searchpanel_default_category_id': ref('base.module_category_accounting_localizations_account_charts'),
|
|
}"/>
|
|
<field name="search_view_id" ref="view_module_filter_inherit_account"/>
|
|
</record>
|
|
|
|
<record id="res_config_settings_view_form" model="ir.ui.view">
|
|
<field name="name">res.config.settings.view.form.inherit.account</field>
|
|
<field name="model">res.config.settings</field>
|
|
<field name="priority" eval="40"/>
|
|
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//form" position="inside">
|
|
<field name="country_code" invisible="1" groups="account.group_account_manager"/>
|
|
<app data-string="Invoicing" string="Invoicing" name="account" groups="account.group_account_manager">
|
|
<field name="has_chart_of_accounts" invisible="1"/>
|
|
<field name="has_accounting_entries" invisible="1"/>
|
|
<block title="Fiscal Localization" name="fiscal_localization_setting_container" attrs="{'invisible': [('has_accounting_entries','!=',False)]}">
|
|
<setting string="Fiscal Localization" company_dependent="1" help="Taxes, fiscal positions, chart of accounts & legal statements for your country">
|
|
<div class="content-group">
|
|
<div class="row mt16">
|
|
<label for="chart_template_id" string="Package" class="col-2 o_light_label"/>
|
|
<field name="chart_template_id" options="{'no_open': True, 'no_create': True}"/>
|
|
</div>
|
|
<div class="mt8">
|
|
<button name="%(account.open_account_charts_modules)d" icon="fa-arrow-right" type="action" string="Install More Packages" discard="0" class="btn-link"/>
|
|
</div>
|
|
</div>
|
|
</setting>
|
|
</block>
|
|
<block title="Taxes" name="default_taxes_setting_container">
|
|
<setting id="default_taxes" string="Default Taxes" company_dependent="1" help="Default taxes applied to local transactions" title="These taxes are set in any new product created.">
|
|
<div class="content-group">
|
|
<div class="row mt16">
|
|
<label string="Sales Tax" for="sale_tax_id" class="col-lg-3 o_light_label"/>
|
|
<field name="sale_tax_id" domain="[('type_tax_use', 'in', ('sale', 'all')), ('company_id', '=', company_id)]"/>
|
|
</div>
|
|
<div class="row">
|
|
<label string="Purchase Tax" for="purchase_tax_id" class="col-lg-3 o_light_label"/>
|
|
<field name="purchase_tax_id" domain="[('type_tax_use', 'in', ('purchase', 'all')), ('company_id', '=', company_id)]"/>
|
|
</div>
|
|
</div>
|
|
</setting>
|
|
<setting id="rounding_method" company_dependent="1" string="Rounding Method" help="How total tax amount is computed in orders and invoices" title="A rounding per line is advised if your prices are tax-included. That way, the sum of line subtotals equals the total with taxes.">
|
|
<field name="tax_calculation_rounding_method" class="o_light_label mt16" widget="radio"/>
|
|
</setting>
|
|
<setting string="Cash Discount Tax Reduction" company_dependent="1" help="When will the tax be reduced when offering a cash discount">
|
|
<field name="early_pay_discount_computation"/>
|
|
</setting>
|
|
<setting id="taxcloud_settings" string="TaxCloud" help="Compute tax rates based on U.S. ZIP codes">
|
|
<field name="module_account_taxcloud" widget="upgrade_boolean"/>
|
|
</setting>
|
|
<setting id="eu_service" title="If you sell goods and services to customers in a foreign EU country, you must charge VAT based on the delivery address. This rule applies regardless of where you are located." documentation="/applications/finance/accounting/taxation/taxes/eu_distance_selling.html" help="Apply VAT of the EU country to which goods and services are delivered.">
|
|
<field name="module_l10n_eu_oss"/>
|
|
</setting>
|
|
<setting id="tax_exigibility" company_dependent="1" help="Allow to configure taxes using cash basis" title="Select this if the taxes should use cash basis, which will create an entry for such taxes on a given account during reconciliation." groups="account.group_account_user">
|
|
<field name="tax_exigibility"/>
|
|
<div class="content-group" attrs="{'invisible': [('tax_exigibility', '=', False)]}">
|
|
<div class="row mt16">
|
|
<label for="tax_cash_basis_journal_id" class="col-lg-3 o_light_label"/>
|
|
<field name="tax_cash_basis_journal_id"/>
|
|
</div>
|
|
<div class="row mt16">
|
|
<label for="account_cash_basis_base_account_id" class="col-lg-3 o_light_label"/>
|
|
<field name="account_cash_basis_base_account_id"/>
|
|
</div>
|
|
</div>
|
|
</setting>
|
|
<setting id="tax_fiscal_country_234" string="Fiscal Country" company_dependent="1" help="Domestic country of your accounting">
|
|
<field name="account_fiscal_country_id" options="{'no_create': True, 'no_open': True}"/>
|
|
</setting>
|
|
</block>
|
|
<block title="Currencies" name="main_currency_setting_container">
|
|
<setting id="main_currency" string="Main Currency" company_dependent="1" help="Main currency of your company">
|
|
<div class="content-group">
|
|
<div class="row mt16">
|
|
<label for="currency_id" class="col-lg-3 o_light_label"/>
|
|
<field name="currency_id" options="{'no_create_edit': True, 'no_open': True}" context="{'active_test': False}"/>
|
|
<field name="group_multi_currency" invisible="1"/>
|
|
</div>
|
|
<div class="mt8">
|
|
<button type="action" name="%(base.action_currency_form)d" string="Currencies" class="btn-link" icon="fa-arrow-right"/>
|
|
</div>
|
|
</div>
|
|
</setting>
|
|
<setting id="update_exchange_rates" attrs="{'invisible': [('group_multi_currency', '=', False)]}" help="Update exchange rates automatically">
|
|
<field name="module_currency_rate_live" widget="upgrade_boolean"/>
|
|
</setting>
|
|
</block>
|
|
<h2></h2>
|
|
<block title="Customer Invoices" id="invoicing_settings">
|
|
<setting id="default_setting_options" string="Default Sending Options" help="Those options will be selected by default when clicking "Send & Print" on invoices">
|
|
<div class="mt16">
|
|
<div class="content-group" id="send_default">
|
|
<div>
|
|
<field name="invoice_is_print"/>
|
|
<label for="invoice_is_print"/>
|
|
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific."/>
|
|
</div>
|
|
<div>
|
|
<field name="invoice_is_email"/>
|
|
<label for="invoice_is_email"/>
|
|
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific."/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</setting>
|
|
<setting id="send_invoices_followups" help="Send invoices and payment follow-ups by post">
|
|
<field name="module_snailmail_account"/>
|
|
</setting>
|
|
<setting id="invoice_delivery_addresses" documentation="/applications/sales/sales/send_quotations/different_addresses.html" help="Select specific invoice and delivery addresses">
|
|
<field name="group_sale_delivery_address"/>
|
|
</setting>
|
|
<setting id="line_subtotals" help="Line subtotals tax display">
|
|
<field name="show_line_subtotals_tax_selection" class="o_light_label" widget="radio"/>
|
|
<field name="group_show_line_subtotals_tax_excluded" invisible="1"/>
|
|
<field name="group_show_line_subtotals_tax_included" invisible="1"/>
|
|
</setting>
|
|
<setting id="get_invoice_warnings" string="Warnings" help="Get warnings when invoicing specific customers">
|
|
<field name="group_warning_account"/>
|
|
</setting>
|
|
<setting id="smallest_coinage_currency" help="Define the smallest coinage of the currency used to pay by cash">
|
|
<field name="group_cash_rounding"/>
|
|
<div class="mt8">
|
|
<button name="%(account.rounding_list_action)d" icon="fa-arrow-right"
|
|
type="action" string="Cash Roundings" class="btn-link"
|
|
attrs="{'invisible': [('group_cash_rounding', '=', False)]}"/>
|
|
</div>
|
|
</setting>
|
|
<setting id="intrastat_statistics" help="Collect information and produce statistics on the trade in goods in Europe with intrastat">
|
|
<field name="module_account_intrastat" widget="upgrade_boolean"/>
|
|
</setting>
|
|
<setting id="default_incoterm" string="Default Incoterm" help="Default Incoterm of your company">
|
|
<field name="incoterm_id"/>
|
|
</setting>
|
|
<setting id="show_sale_receipts" help="Activate to create sale receipt">
|
|
<field name="group_show_sale_receipts" widget="upgrade_boolean"/>
|
|
</setting>
|
|
<setting id="use_invoice_terms" company_dependent="1" help="Add your terms & conditions at the bottom of invoices/orders/quotations">
|
|
<field name="use_invoice_terms"/>
|
|
<div class="content-group" attrs="{'invisible': [('use_invoice_terms','=',False)]}">
|
|
<div class="mt16">
|
|
<field name="terms_type" class="o_light_label" widget="radio"/>
|
|
<div>
|
|
<field name="invoice_terms"
|
|
attrs="{'invisible': [('terms_type', '=', 'html')]}"
|
|
class="oe_account_terms mt-5 w-100"
|
|
placeholder="Insert your terms & conditions here..."/>
|
|
</div>
|
|
<div class="mt8" attrs="{'invisible': [('terms_type', '!=', 'html')]}">
|
|
<button name="action_update_terms" icon="fa-arrow-right" type="object" string="Update Terms" class="btn-link"/>
|
|
</div>
|
|
<field name="preview_ready" invisible="1"/>
|
|
<div class="mt4 ms-1" attrs="{'invisible': [('preview_ready', '=', False)]}">
|
|
<a class="btn-link" href="/terms" role="button">
|
|
<i class="fa fa-arrow-right"></i>
|
|
Preview
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</setting>
|
|
<setting company_dependent="1" help="Trigger alerts when creating Invoices and Sales Orders for Partners with a Total Receivable amount exceeding a limit.">
|
|
<field name="account_use_credit_limit"/>
|
|
<div class="content-group mt-2" attrs="{'invisible': [('account_use_credit_limit', '=', False)]}">
|
|
<div class="row">
|
|
<label for="account_default_credit_limit" class="col-lg-4 o_light_label"/>
|
|
<field name="account_default_credit_limit"/>
|
|
</div>
|
|
</div>
|
|
</setting>
|
|
</block>
|
|
<block title="Customer Payments" id="pay_invoice_online_setting_container">
|
|
<setting help="Let your customers pay their invoices online">
|
|
<field name="module_account_payment"/>
|
|
</setting>
|
|
<setting id="account_batch_payment" string="Batch Payments" help="Group payments into a single batch to ease the reconciliation process">
|
|
<field name="module_account_batch_payment" widget="upgrade_boolean"/>
|
|
</setting>
|
|
<setting id="collect_customer_payment" title="If you check this box, you will be able to collect payments using SEPA Direct Debit mandates." string="SEPA Direct Debit (SDD)" company_dependent="1" help="Collect customer payments in one-click using Euro SEPA Service">
|
|
<field name="module_account_sepa_direct_debit" class="oe_inline" widget="upgrade_boolean"/>
|
|
<div class="content-group" attrs="{'invisible': [('module_account_sepa_direct_debit', '=', False)]}">
|
|
<div class="text-warning mt16 mb4">
|
|
Save this page and come back here to set up the feature.
|
|
</div>
|
|
</div>
|
|
</setting>
|
|
<setting id="qr_code_invoices" title="Add a QR-code to your invoices so that your customers can pay instantly with their mobile banking application." string="QR Codes" company_dependent="1" help="Add a payment QR-code to your invoices">
|
|
<field name="qr_code" class="oe_inline"/>
|
|
</setting>
|
|
</block>
|
|
<block title="Vendor Bills" id="account_vendor_bills">
|
|
<setting id="show_purchase_receipts" help="Activate to create purchase receipt">
|
|
<field name="group_show_purchase_receipts" widget="upgrade_boolean"/>
|
|
</setting>
|
|
</block>
|
|
<block title="Vendor Payments" id="print_vendor_checks_setting_container">
|
|
<setting id="print_checks" groups="account.group_account_user" string="Checks" company_dependent="1" help="Print checks to pay your vendors">
|
|
<field name="module_account_check_printing"/>
|
|
</setting>
|
|
<setting id="sepa_payments" title="If you check this box, you will be able to register your payment using SEPA." company_dependent="1" help="Pay your bills in one-click using Euro SEPA Service">
|
|
<field name="module_account_sepa" widget="upgrade_boolean"/>
|
|
</setting>
|
|
</block>
|
|
|
|
<block title="Digitization" id="account_digitalization">
|
|
<setting id="account_ocr_settings" help="Digitize your PDF or scanned documents with OCR and Artificial Intelligence">
|
|
<field name="module_account_invoice_extract" widget="upgrade_boolean"/>
|
|
<div id="msg_invoice_extract" class="content-group" attrs="{'invisible': [('module_account_invoice_extract', '=', False)]}">
|
|
<div class="text-warning mt16 mb4">
|
|
Save this page and come back here to set up the feature.
|
|
</div>
|
|
</div>
|
|
</setting>
|
|
</block>
|
|
|
|
<t groups="account.group_account_user">
|
|
<block title="Default Accounts" id="default_accounts">
|
|
<setting attrs="{'invisible': [('group_multi_currency', '=', False)]}" string="Post Exchange difference entries in:">
|
|
<div class="content-group">
|
|
<div class="row mt8">
|
|
<label for="currency_exchange_journal_id" class="col-lg-4 o_light_label" string="Journal" />
|
|
<field name="currency_exchange_journal_id"/>
|
|
</div>
|
|
<div class="row mt8">
|
|
<label for="income_currency_exchange_account_id" class="col-lg-4 o_light_label"/>
|
|
<field name="income_currency_exchange_account_id"/>
|
|
</div>
|
|
<div class="row mt8">
|
|
<label for="expense_currency_exchange_account_id" class="col-lg-4 o_light_label"/>
|
|
<field name="expense_currency_exchange_account_id"/>
|
|
</div>
|
|
</div>
|
|
</setting>
|
|
<setting string="The following default accounts are used with certain features.">
|
|
<div class="content-group">
|
|
<div class="row mt8">
|
|
<label for="account_journal_suspense_account_id" class="col-lg-5 o_light_label"/>
|
|
<field name="account_journal_suspense_account_id"/>
|
|
</div>
|
|
<div class="row mt8">
|
|
<label for="account_journal_payment_debit_account_id" class="col-lg-5 o_light_label"/>
|
|
<field name="account_journal_payment_debit_account_id"/>
|
|
</div>
|
|
<div class="row mt8">
|
|
<label for="account_journal_payment_credit_account_id" class="col-lg-5 o_light_label"/>
|
|
<field name="account_journal_payment_credit_account_id"/>
|
|
</div>
|
|
<div class="row mt8">
|
|
<label for="transfer_account_id" class="col-lg-5 o_light_label"/>
|
|
<field name="transfer_account_id"/>
|
|
</div>
|
|
<div class="row mt8">
|
|
<label for="account_journal_early_pay_discount_gain_account_id" class="col-lg-5 o_light_label"/>
|
|
<field name="account_journal_early_pay_discount_gain_account_id"/>
|
|
</div>
|
|
<div class="row mt8">
|
|
<label for="account_journal_early_pay_discount_loss_account_id" class="col-lg-5 o_light_label"/>
|
|
<field name="account_journal_early_pay_discount_loss_account_id"/>
|
|
</div>
|
|
</div>
|
|
</setting>
|
|
</block>
|
|
</t>
|
|
|
|
<t groups="account.group_account_user">
|
|
<block title="Bank & Cash" id="bank_cash">
|
|
<setting id="import_bank_statements_csv" title="Once installed, set 'Bank Feeds' to 'File Import' in bank account settings.This adds a button to import from the Accounting dashboard." string="CSV Import" help="Import your bank statements in CSV">
|
|
<field name="module_account_bank_statement_import_csv" widget="upgrade_boolean"/>
|
|
</setting>
|
|
<setting title="Once installed, set 'Bank Feeds' to 'File Import' in bank account settings.This adds a button to import from the Accounting dashboard." string="QIF Import" help="Import your bank statements in QIF">
|
|
<field name="module_account_bank_statement_import_qif" widget="upgrade_boolean"/>
|
|
</setting>
|
|
<setting title="Once installed, set 'Bank Feeds' to 'File Import' in bank account settings.This adds a button to import from the Accounting dashboard." string="OFX Import" help="Import your bank statements in OFX">
|
|
<field name="module_account_bank_statement_import_ofx" widget="upgrade_boolean"/>
|
|
</setting>
|
|
<setting id="import_bank_statement_camt" title="Once installed, set 'Bank Feeds' to 'File Import' in bank account settings.This adds a button to import from the Accounting dashboard." string="CAMT Import" help="Import your bank statements in CAMT.053">
|
|
<field name="module_account_bank_statement_import_camt" widget="upgrade_boolean"/>
|
|
</setting>
|
|
</block>
|
|
</t>
|
|
|
|
<t groups="account.group_account_user">
|
|
<block title="Fiscal Periods" id="accounting_reports">
|
|
<setting id="fiscalyear" invisible="1" groups="account.group_account_user"/>
|
|
<setting id="dynamic_report" invisible="1" groups="account.group_account_user" help="Navigate easily through reports and see what is behind the numbers">
|
|
<field name="module_account_reports" widget="upgrade_boolean"/>
|
|
</setting>
|
|
</block>
|
|
</t>
|
|
<block title="Analytics" id="analytic">
|
|
<setting id="track_costs_revenues" title="Allows you to use the analytic accounting." groups="account.group_account_user" help="Track costs & revenues by project, department, etc">
|
|
<field name="group_analytic_accounting"/>
|
|
</setting>
|
|
<setting id="account_budget" title="This allows accountants to manage analytic and crossovered budgets. Once the master budgets and the budgets are defined, the project managers can set the planned amount on each analytic account." groups="account.group_account_user" help="Use budgets to compare actual with expected revenues and costs">
|
|
<field name="module_account_budget" widget="upgrade_boolean"/>
|
|
</setting>
|
|
<setting id="monitor_product_margins" string="Margin Analysis" help="Monitor your product margins from invoices">
|
|
<field name="module_product_margin"/>
|
|
</setting>
|
|
</block>
|
|
<block title="Storno Accounting" id="storno">
|
|
<setting id="enable_storno_accounting" company_dependent="1" help="Use Storno accounting" title="Allows you to use Storno accounting.">
|
|
<field name="account_storno"/>
|
|
</setting>
|
|
</block>
|
|
<block title="Accounting Firms mode" id="quick_edit_mode">
|
|
<div class="text-muted">
|
|
<p style="margin-bottom: 0">Accounting firm mode will change invoice/bill encoding:</p>
|
|
<p style="margin-bottom: 0"> - The document's sequence becomes editable on all documents.</p>
|
|
<p style="margin-bottom: 0"> - A new field « Total (tax inc.) » to speed up and control the encoding by automating line creation with the right account & tax.</p>
|
|
<p style="margin-bottom: 0"> - A default Customer Invoice / Vendor Bill date will be suggested.</p>
|
|
</div>
|
|
<setting company_dependent="1">
|
|
<field name="quick_edit_mode" placeholder="Disabled"/>
|
|
</setting>
|
|
</block>
|
|
</app>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_account_config" model="ir.actions.act_window">
|
|
<field name="name">Settings</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="res_model">res.config.settings</field>
|
|
<field name="view_mode">form</field>
|
|
<field name="target">inline</field>
|
|
<field name="context">{'module' : 'account', 'bin_size': False}</field>
|
|
</record>
|
|
|
|
</data>
|
|
</odoo>
|