diff options
| author | Hiral Bhavsar <hbh@odoo.com> | 2017-04-06 15:02:49 +0530 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2017-07-27 11:31:26 +0200 |
| commit | a8a9dbe5988391d73e933f7fd63bed559cc0ad09 (patch) | |
| tree | fb26aa614cb4339445ac00f7bda97f856857430d | |
| parent | 8a1311bca17bd93a87f94579698adddc416f78f0 (diff) | |
[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'.
5 files changed, 45 insertions, 26 deletions
diff --git a/addons/account/models/account_config_settings.py b/addons/account/models/account_config_settings.py index d0fcbf36a44..66fc95756ac 100644 --- a/addons/account/models/account_config_settings.py +++ b/addons/account/models/account_config_settings.py @@ -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): diff --git a/addons/account/views/account_config_settings_views.xml b/addons/account/views/account_config_settings_views.xml index d7aad5c3dfe..c9fd59d1954 100644 --- a/addons/account/views/account_config_settings_views.xml +++ b/addons/account/views/account_config_settings_views.xml @@ -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> + <button name="%(account.open_account_charts_modules)d" icon="fa-arrow-right" type="action" string="Install More Packages" class="btn-link"/> </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> + </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"/> diff --git a/addons/account_asset/views/account_config_settings_views.xml b/addons/account_asset/views/account_config_settings_views.xml index ecdaf929538..f0f594c1002 100644 --- a/addons/account_asset/views/account_config_settings_views.xml +++ b/addons/account_asset/views/account_config_settings_views.xml @@ -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> diff --git a/addons/account_budget/views/account_config_settings_views.xml b/addons/account_budget/views/account_config_settings_views.xml index f48dedb7f98..762b5188c03 100644 --- a/addons/account_budget/views/account_config_settings_views.xml +++ b/addons/account_budget/views/account_config_settings_views.xml @@ -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> diff --git a/addons/l10n_eu_service/views/account_settings_config_views.xml b/addons/l10n_eu_service/views/account_settings_config_views.xml index 071cf2fd397..e4071cc5887 100644 --- a/addons/l10n_eu_service/views/account_settings_config_views.xml +++ b/addons/l10n_eu_service/views/account_settings_config_views.xml @@ -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> |
