[IMP] account: Correct the settings display according to the enabled options
PURPOSE ======= Clean accounting new settings. SPECIFICATION ============= - When a setting is not active, I don't want to see the green arrow sending back to the configuration part. Example : If I unactivate the follow-up levels, I don't want to see the green arrow "Follow-up levels" anymore - Add checkbox to 'TaxCloud Connection' - Also visible the label 'Fiscal Localization' and its text only if CoA is not set. - Set '# of digits' always visible and relabel to '# of digits on accounts'. Also put it inside new setting 'Chart of Accounts'.
This commit is contained in:
committed by
Yannick Tivisse
parent
8a1311bca1
commit
a8a9dbe598
@@ -59,6 +59,7 @@ class AccountConfigSettings(models.TransientModel):
|
||||
module_print_docsaway = fields.Boolean(string="Docsaway")
|
||||
module_product_margin = fields.Boolean(string="Allow Product Margin")
|
||||
module_l10n_eu_service = fields.Boolean(string="EU Digital Goods VAT")
|
||||
module_account_taxcloud = fields.Boolean(string="Account TaxCloud")
|
||||
|
||||
@api.model
|
||||
def get_values(self):
|
||||
|
||||
@@ -22,34 +22,40 @@
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="has_chart_of_accounts" invisible="1"/>
|
||||
<field name="has_accounting_entries" invisible="1"/>
|
||||
<h2>Fiscal Localization</h2>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Fiscal Localization"/>
|
||||
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific." groups="base.group_multi_company"/>
|
||||
<div class="text-muted">
|
||||
Taxes, fiscal positions, chart of accounts & legal statements for your country
|
||||
<h2>Fiscal Localization</h2>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" attrs="{'invisible': [('has_chart_of_accounts','!=',False)]}">
|
||||
<div class="o_setting_left_pane"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Fiscal Localization"/>
|
||||
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific." groups="base.group_multi_company"/>
|
||||
<div class="text-muted">
|
||||
Taxes, fiscal positions, chart of accounts & legal statements for your country
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<div class="row mt16">
|
||||
<label string="Package" class="col-md-3 o_light_label"/>
|
||||
<field name="chart_template_id" widget="selection"/>
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<span attrs="{'invisible': [('has_accounting_entries', '=', True)]}">
|
||||
<div class="row mt16">
|
||||
<label string="Package" class="col-md-3 o_light_label"/>
|
||||
<field name="chart_template_id" widget="selection"/>
|
||||
</div>
|
||||
<div>
|
||||
<button name="%(account.open_account_charts_modules)d" icon="fa-arrow-right" type="action" string="Install More Packages" class="btn-link"/>
|
||||
</div>
|
||||
</span>
|
||||
<div class="row mt16" groups="base.group_no_one">
|
||||
<label string="# of digits" class="col-md-3 o_light_label"/>
|
||||
<field name="code_digits"/>
|
||||
</div>
|
||||
<div>
|
||||
<button name="%(account.open_account_charts_modules)d" icon="fa-arrow-right" type="action" string="Install More Packages" class="btn-link"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Chart of Accounts"/>
|
||||
<div class="content-group">
|
||||
<div class="row mt16">
|
||||
<label string="# of digits on accounts" class="col-md-4 o_light_label"/>
|
||||
<field name="code_digits"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Taxes</h2>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" title="These taxes are set in any new product created.">
|
||||
@@ -83,6 +89,18 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" id="taxcloud_settings">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_account_taxcloud"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane" name="account_taxcloud_right_pane">
|
||||
<label for="module_account_taxcloud" string="TaxCloud Connection"/>
|
||||
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific." groups="base.group_multi_company"/>
|
||||
<div class="text-muted">
|
||||
Compute tax rates based on U.S. ZIP codes
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" id="eu_service" title="If you're selling digital goods to customers in the EU, you must charge VAT based on your customers' locations. This rule applies regardless of you are located. Digital goods are defined in the legislation as broadcasting, telecommunications, and services that are electronically supplied instead of shipped. Gift cards sent online are not included in the definition.">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_l10n_eu_service"/>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<field name="inherit_id" ref="account.account_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<div id="msg_account_asset" position="replace">
|
||||
<div class="content-group">
|
||||
<div class="content-group" attrs="{'invisible': [('module_account_asset', '=', False)]}">
|
||||
<div class="mt16">
|
||||
<button name="%(account_asset.action_account_asset_asset_list_normal_purchase)d" icon="fa-arrow-right" type="action" string="Asset Types" class="btn-link"/>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<field name="inherit_id" ref="account.account_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<div id="msg_account_budget" position="replace">
|
||||
<div class="content-group">
|
||||
<div class="content-group" attrs="{'invisible': [('module_account_budget', '=', False)]}">
|
||||
<div class="mt16">
|
||||
<button name="%(account_budget.open_budget_post_form)d" icon="fa-arrow-right" type="action" string="Budgetary Positions" class="btn-link"/>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<field name="inherit_id" ref="account.account_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<div name="l10n_eu_service_right_pane" position="inside">
|
||||
<div class="content-group">
|
||||
<div class="content-group" attrs="{'invisible': [('module_l10n_eu_service', '=', False)]}">
|
||||
<div>
|
||||
<button name="%(l10n_eu_service.action_eu_service)d" icon="fa-arrow-right" type="action" string="Add new countries" class="btn-link"/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user