diff --git a/addons/account/__manifest__.py b/addons/account/__manifest__.py index 7c3a6b642dd..203a93617cb 100644 --- a/addons/account/__manifest__.py +++ b/addons/account/__manifest__.py @@ -22,7 +22,6 @@ You could use this simplified accounting in case you work with an (external) acc 'data/data_account_type.xml', 'data/account_data.xml', 'data/digest_data.xml', - 'views/account_menuitem.xml', 'views/account_payment_view.xml', 'wizard/account_accrual_accounting_view.xml', 'wizard/account_unreconcile_view.xml', @@ -66,6 +65,7 @@ You could use this simplified accounting in case you work with an (external) acc 'report/account_hash_integrity_templates.xml', 'wizard/account_transfer_wizard.xml', 'views/res_currency.xml', + 'views/account_menuitem.xml', ], 'demo': [ 'demo/account_demo.xml', diff --git a/addons/account/models/account.py b/addons/account/models/account.py index c8365d3f535..011b193e12f 100644 --- a/addons/account/models/account.py +++ b/addons/account/models/account.py @@ -715,7 +715,6 @@ class AccountAccount(models.Model): 'view_mode': 'form', 'res_model': 'account.account', 'res_id': self.id, - 'target': 'new', } def action_duplicate_accounts(self): @@ -1430,6 +1429,13 @@ class AccountTaxGroup(models.Model): property_tax_receivable_account_id = fields.Many2one('account.account', company_dependent=True, string='Tax current account (receivable)') property_advance_tax_payment_account_id = fields.Many2one('account.account', company_dependent=True, string='Advance Tax payment account') + def _any_is_configured(self, company_id): + domain = expression.OR([[('property_tax_payable_account_id', '!=', False)], + [('property_tax_receivable_account_id', '!=', False)], + [('property_advance_tax_payment_account_id', '!=', False)]]) + group_with_config = self.with_company(company_id).search_count(domain) + return group_with_config > 0 + class AccountTax(models.Model): _name = 'account.tax' diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml index ce9f4b59310..e8851a8ad6c 100644 --- a/addons/account/report/account_invoice_report_view.xml +++ b/addons/account/report/account_invoice_report_view.xml @@ -125,7 +125,5 @@ From this report, you can have an overview of the amount invoiced to your customers. The search tool can also be used to personalise your Invoices reports and so, match this analysis to your needs. - - diff --git a/addons/account/views/account_analytic_view.xml b/addons/account/views/account_analytic_view.xml index 8e3dd456e13..c91e6070079 100644 --- a/addons/account/views/account_analytic_view.xml +++ b/addons/account/views/account_analytic_view.xml @@ -69,30 +69,5 @@ - - - - - - - diff --git a/addons/account/views/account_cash_rounding_view.xml b/addons/account/views/account_cash_rounding_view.xml index e6bae7df5c5..de794b64b5d 100644 --- a/addons/account/views/account_cash_rounding_view.xml +++ b/addons/account/views/account_cash_rounding_view.xml @@ -58,8 +58,5 @@ - - diff --git a/addons/account/views/account_incoterms_view.xml b/addons/account/views/account_incoterms_view.xml index ddb8b637dbe..9e33bae573a 100644 --- a/addons/account/views/account_incoterms_view.xml +++ b/addons/account/views/account_incoterms_view.xml @@ -57,7 +57,5 @@ - diff --git a/addons/account/views/account_journal_dashboard_view.xml b/addons/account/views/account_journal_dashboard_view.xml index 8b31b018e72..c15fe61be4b 100644 --- a/addons/account/views/account_journal_dashboard_view.xml +++ b/addons/account/views/account_journal_dashboard_view.xml @@ -372,5 +372,4 @@ - diff --git a/addons/account/views/account_menuitem.xml b/addons/account/views/account_menuitem.xml index 2c8b746ba1f..8375abc214e 100644 --- a/addons/account/views/account_menuitem.xml +++ b/addons/account/views/account_menuitem.xml @@ -9,30 +9,70 @@ web_icon="account,static/description/icon.png" sequence="40"/> + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/addons/account/views/account_move_views.xml b/addons/account/views/account_move_views.xml index 5778e008d34..0ea18cd3a3e 100644 --- a/addons/account/views/account_move_views.xml +++ b/addons/account/views/account_move_views.xml @@ -608,7 +608,13 @@ options='{"always_reload": True, "no_quick_create": True}' attrs="{'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt'))]}"/> - +
+
+ -