[FIX] account: tests

It seems most accounting tests relied on the fact that the "accountman"
test user has both the user AND manager groups (but previously, the
manager group was given by the implied group relation "Settings" ->
"account manager")

Part-of: odoo/odoo#91909
This commit is contained in:
Victor Feyens
2022-06-23 23:48:29 +02:00
parent 76d5879c1e
commit 954c85dc96
3 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -75,7 +75,7 @@
</record>
<record id="base.user_admin" model="res.users">
<field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/>
<field name="groups_id" eval="[(4, ref('account.group_account_manager'))]"/>
</record>
<record id="group_warning_account" model="res.groups">
+5 -1
View File
@@ -46,7 +46,11 @@ class AccountTestInvoicingCommon(TransactionCase):
'name': 'Because I am accountman!',
'login': 'accountman',
'password': 'accountman',
'groups_id': [(6, 0, cls.env.user.groups_id.ids), (4, cls.env.ref('account.group_account_user').id)],
'groups_id': [
(6, 0, cls.env.user.groups_id.ids),
(4, cls.env.ref('account.group_account_manager').id),
(4, cls.env.ref('account.group_account_user').id),
],
})
user.partner_id.email = 'accountman@test.com'
@@ -13,7 +13,7 @@ class TestTourRenderInvoiceReport(AccountTestInvoicingHttpCommon):
cls.env.user.write({
'groups_id': [
(6, 0, (cls.env.ref('account.group_account_invoice') + cls.env.ref('base.group_system')).ids),
(6, 0, (cls.env.ref('account.group_account_manager') + cls.env.ref('base.group_system')).ids),
],
})