-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] minor perf improvement during tests
During tests, some creation of user records would unnecessarily trigger password reset or set a password, both of which would trigger password hashing which takes some time (for good reasons). Fix by: * passing no_reset_password in YAML tests and some Python tests still missing it (a number of Python tests already used it) * removing passwords from YAML records as they're never necessary, the test user records are not expected to ever log in
- Loading branch information
Showing
25 changed files
with
22 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
company_id: base.main_company | ||
name: Accountant | ||
login: acc | ||
password: acc | ||
email: [email protected] | ||
- | ||
I added groups for Accountant. | ||
|
@@ -21,12 +20,11 @@ | |
company_id: base.main_company | ||
name: Financial Manager | ||
login: fm | ||
password: fm | ||
email: [email protected] | ||
- | ||
I added groups for Financial Manager. | ||
- | ||
!record {model: res.users, id: res_users_account_manager}: | ||
groups_id: | ||
- account.group_account_manager | ||
- base.group_partner_manager | ||
- base.group_partner_manager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
company_id: base.main_company | ||
name: Voucher Accountant | ||
login: vacc | ||
password: acc | ||
email: [email protected] | ||
- | ||
I added groups to Accountant for account voucher. | ||
|
@@ -21,7 +20,6 @@ | |
company_id: base.main_company | ||
name: Financial Manager for voucher | ||
login: fmv | ||
password: fmv | ||
email: [email protected] | ||
- | ||
I added groups to Financial Manager for account voucher. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
company_id: base.main_company | ||
name: Crm Sales manager | ||
login: csm | ||
password: csm | ||
email: [email protected] | ||
- | ||
I added groups for Crm Salesmanager. | ||
|
@@ -20,7 +19,6 @@ | |
company_id: base.main_company | ||
name: Crm Salesman | ||
login: csu | ||
password: csu | ||
email: [email protected] | ||
- | ||
I added groups for Crm Salesman. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,22 +4,18 @@ | |
!record {model: res.users, id: test_res_user_01}: | ||
name: 'Test user A' | ||
login: '[email protected]' | ||
new_password: 'tua' | ||
- | ||
!record {model: res.users, id: test_res_user_02}: | ||
name: 'Test user B' | ||
login: '[email protected]' | ||
new_password: 'tub' | ||
- | ||
!record {model: res.users, id: test_res_user_03}: | ||
name: 'Test user C' | ||
login: '[email protected]' | ||
new_password: 'tuc' | ||
- | ||
!record {model: res.users, id: test_res_user_04}: | ||
name: 'Test user D' | ||
login: '[email protected]' | ||
new_password: 'tud' | ||
- | ||
Salesman also creates lead so giving access rights of salesman. | ||
- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
company_id: base.main_company | ||
name: Event manager | ||
login: em | ||
password: em | ||
email: [email protected] | ||
- | ||
I added groups for Event manager. | ||
|
@@ -20,7 +19,6 @@ | |
company_id: base.main_company | ||
name: User | ||
login: eu | ||
password: eu | ||
email: [email protected] | ||
- | ||
I added groups for Event user. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
company_id: base.main_company | ||
name: HR manager | ||
login: hrm | ||
password: hrm | ||
- | ||
I added groups for HR Manager. | ||
- | ||
|
@@ -19,7 +18,6 @@ | |
company_id: base.main_company | ||
name: HR Officer | ||
login: hro | ||
password: hro | ||
email: [email protected] | ||
- | ||
I added groups for HR Officer. | ||
|
@@ -34,7 +32,6 @@ | |
company_id: base.main_company | ||
name: Employee | ||
login: emp | ||
password: emp | ||
- | ||
I added groups for Employee. | ||
- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
company_id: base.main_company | ||
name: HR Recruitment Officer | ||
login: hrro | ||
password: hrro | ||
email: [email protected] | ||
- | ||
I added groups for HR Recruitment Officer. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,15 +100,15 @@ def send_email(self, cr, uid, message, *args, **kwargs): | |
'login': 'raoul', | ||
'alias_name': 'raoul', | ||
'groups_id': [(6, 0, [cls.group_employee_id])] | ||
}) | ||
}, {'no_reset_password': True}) | ||
cls.user_bert_id = cls.res_users.create(cr, uid, { | ||
'name': 'Bert Tartignole', | ||
'signature': 'SignBert', | ||
'email': '[email protected]', | ||
'login': 'bert', | ||
'alias_name': 'bert', | ||
'groups_id': [(6, 0, [])] | ||
}) | ||
}, {'no_reset_password': True}) | ||
cls.user_raoul = cls.res_users.browse(cr, uid, cls.user_raoul_id) | ||
cls.user_bert = cls.res_users.browse(cr, uid, cls.user_bert_id) | ||
cls.user_admin = cls.res_users.browse(cr, uid, uid) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
company_id: base.main_company | ||
name: MRP Manager | ||
login: mam | ||
password: mam | ||
email: [email protected] | ||
- | ||
I added groups for MRP Manager. | ||
|
@@ -21,11 +20,10 @@ | |
company_id: base.main_company | ||
name: MRP User | ||
login: mau | ||
password: mau | ||
email: [email protected] | ||
- | ||
I added groups for MRP User. | ||
- | ||
!record {model: res.users, id: res_users_mrp_user}: | ||
groups_id: | ||
- mrp.group_mrp_user | ||
- mrp.group_mrp_user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
company_id: base.main_company | ||
name: MRP User | ||
login: maou | ||
password: maou | ||
email: [email protected] | ||
- | ||
I added groups for MRP User. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
company_id: base.main_company | ||
name: MRP Manager | ||
login: marm | ||
password: marm | ||
email: [email protected] | ||
- | ||
I added groups for MRP Repair Manager. | ||
|
@@ -20,11 +19,10 @@ | |
company_id: base.main_company | ||
name: MRP User | ||
login: maru | ||
password: maru | ||
email: [email protected] | ||
- | ||
I added groups for MRP Repair User. | ||
- | ||
!record {model: res.users, id: res_mrp_repair_user}: | ||
groups_id: | ||
- mrp.group_mrp_user | ||
- mrp.group_mrp_user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,12 @@ def setUpClass(cls): | |
cls.group_portal_id = cls.env.ref('base.group_portal').id | ||
|
||
# Create Chell (portal user) | ||
cls.user_chell_id = cls.res_users.create(cr, uid, {'name': 'Chell Gladys', 'login': 'chell', 'email': '[email protected]', 'groups_id': [(6, 0, [cls.group_portal_id])]}) | ||
cls.user_chell_id = cls.res_users.create(cr, uid, { | ||
'name': 'Chell Gladys', | ||
'login': 'chell', | ||
'email': '[email protected]', | ||
'groups_id': [(6, 0, [cls.group_portal_id])] | ||
}, {'no_reset_password': True}) | ||
cls.user_chell = cls.res_users.browse(cr, uid, cls.user_chell_id) | ||
cls.partner_chell_id = cls.user_chell.partner_id.id | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,21 +57,21 @@ def setUpClass(cls): | |
'alias_name': 'armande', | ||
'email': '[email protected]', | ||
'groups_id': [(6, 0, [cls.group_employee_id, cls.group_project_user_id])] | ||
}) | ||
}, {'no_reset_password': True}) | ||
cls.user_projectmanager_id = cls.res_users.create(cr, uid, { | ||
'name': 'Bastien ProjectManager', | ||
'login': 'bastien', | ||
'alias_name': 'bastien', | ||
'email': '[email protected]', | ||
'groups_id': [(6, 0, [cls.group_employee_id, cls.group_project_manager_id])] | ||
}) | ||
}, {'no_reset_password': True}) | ||
cls.user_none_id = cls.res_users.create(cr, uid, { | ||
'name': 'Charlie Avotbonkeur', | ||
'login': 'charlie', | ||
'alias_name': 'charlie', | ||
'email': '[email protected]', | ||
'groups_id': [(6, 0, [])] | ||
}) | ||
}, {'no_reset_password': True}) | ||
cls.user_projectuser = cls.res_users.browse(cr, uid, cls.user_projectuser_id) | ||
cls.user_projectmanager = cls.res_users.browse(cr, uid, cls.user_projectmanager_id) | ||
cls.partner_projectuser_id = cls.user_projectuser.partner_id.id | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
company_id: base.main_company | ||
name: Project Manager | ||
login: prim | ||
password: prim | ||
email: [email protected] | ||
- | ||
I added groups for Project manager. | ||
|
@@ -20,11 +19,10 @@ | |
company_id: base.main_company | ||
name: Project User | ||
login: priu | ||
password: priu | ||
email: [email protected] | ||
- | ||
I added groups for Project user. | ||
- | ||
!record {model: res.users, id: res_users_project_issue_user}: | ||
groups_id: | ||
- project.group_project_user | ||
- project.group_project_user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
company_id: base.main_company | ||
name: Purchase Manager | ||
login: pm | ||
password: pm | ||
email: [email protected] | ||
- | ||
I added groups for Purchase manager. | ||
|
@@ -20,7 +19,6 @@ | |
company_id: base.main_company | ||
name: Purchase User | ||
login: pu | ||
password: pu | ||
email: [email protected] | ||
- | ||
I added groups for Purchase user. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
company_id: base.main_company | ||
name: Purchase requisition Manager | ||
login: prm | ||
password: prm | ||
email: [email protected] | ||
- | ||
I added groups for Purchase Requisition Manager. | ||
|
@@ -20,11 +19,10 @@ | |
company_id: base.main_company | ||
name: Purchase requisition User | ||
login: pru | ||
password: pru | ||
email: [email protected] | ||
- | ||
I added groups for Purchase Requisition User. | ||
- | ||
!record {model: res.users, id: res_users_purchase_requisition_user}: | ||
groups_id: | ||
- purchase_requisition.group_purchase_requisition_user | ||
- purchase_requisition.group_purchase_requisition_user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
company_id: base.main_company | ||
name: Sales manager | ||
login: sm | ||
password: sm | ||
email: [email protected] | ||
- | ||
I added groups for Salesmanager. | ||
|
@@ -20,7 +19,6 @@ | |
company_id: base.main_company | ||
name: Salesman | ||
login: su | ||
password: su | ||
email: [email protected] | ||
- | ||
I added groups for Salesman. | ||
|
Oops, something went wrong.