From c2177b81ddd00ecdc42a88dc3b2a8d6e521cfd65 Mon Sep 17 00:00:00 2001 From: Olivier Colson Date: Wed, 19 Sep 2018 15:49:46 +0200 Subject: [PATCH] [FIX] account: don't make administrator part of account users group by default Before that, the administrator could use accounting features by default. This is not what we want, the group only gets assigned by default when installing account_accountant, on enterprise. --- addons/account/security/account_security.xml | 3 +-- addons/account/tests/test_reconciliation_widget.py | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/account/security/account_security.xml b/addons/account/security/account_security.xml index 1f577711a6c..efb437ea246 100644 --- a/addons/account/security/account_security.xml +++ b/addons/account/security/account_security.xml @@ -41,9 +41,8 @@ - - + diff --git a/addons/account/tests/test_reconciliation_widget.py b/addons/account/tests/test_reconciliation_widget.py index f564b59380d..07700717439 100644 --- a/addons/account/tests/test_reconciliation_widget.py +++ b/addons/account/tests/test_reconciliation_widget.py @@ -14,6 +14,9 @@ class TestUi(odoo.tests.HttpCase): if not bank_stmt: _logger.exception('Could not find bank statement BNK/2014/001') + # To be able to test reconciliation, admin user must have access to accounting features, so we give him the right group for that + self.env.ref('base.user_admin').write({'groups_id': [(4, self.env.ref('account.group_account_user').id)]}) + self.phantom_js("/web#statement_ids=" + str(bank_stmt.id) + "&action=bank_statement_reconciliation_view", "odoo.__DEBUG__.services['web_tour.tour'].run('bank_statement_reconciliation')", "odoo.__DEBUG__.services['web_tour.tour'].tours.bank_statement_reconciliation.ready", login="admin")