[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:
@@ -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">
|
||||
|
||||
@@ -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),
|
||||
],
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user