diff --git a/addons/hr_timesheet/__openerp__.py b/addons/hr_timesheet/__openerp__.py index bff25e8e55d..3c026ac2d07 100644 --- a/addons/hr_timesheet/__openerp__.py +++ b/addons/hr_timesheet/__openerp__.py @@ -57,6 +57,7 @@ up a management by affair. ], 'demo': ['hr_timesheet_demo.xml'], 'test': [ + 'test/hr_timesheet_users.yml', 'test/test_hr_timesheet.yml', 'test/hr_timesheet_report.yml', 'test/hr_timesheet_demo.yml', diff --git a/addons/hr_timesheet/test/hr_timesheet_demo.yml b/addons/hr_timesheet/test/hr_timesheet_demo.yml index a868be2d710..723e3a1a08c 100644 --- a/addons/hr_timesheet/test/hr_timesheet_demo.yml +++ b/addons/hr_timesheet/test/hr_timesheet_demo.yml @@ -1,3 +1,8 @@ +- + Give the access rights of Hr Officer to create employee. +- + !context + uid: 'res_hr_timesheet_officer' - !record {model: hr.analytic.timesheet, id: working_hours_coding, view: False}: user_id: base.user_demo diff --git a/addons/hr_timesheet/test/hr_timesheet_users.yml b/addons/hr_timesheet/test/hr_timesheet_users.yml new file mode 100644 index 00000000000..428c1b7c40f --- /dev/null +++ b/addons/hr_timesheet/test/hr_timesheet_users.yml @@ -0,0 +1,30 @@ +- + Create a user as 'HR Manager' +- + !record {model: res.users, id: res_hr_timesheet_manager}: + company_id: base.main_company + name: HR manager + login: hrtm + password: hrtm + groups_id: + - base.group_hr_manager +- + Create a user as 'HR Officer' +- + !record {model: res.users, id: res_hr_timesheet_officer}: + company_id: base.main_company + name: HR Officer + login: hrto + password: hrto + groups_id: + - base.group_hr_user +- + Create a user as 'Employee' +- + !record {model: res.users, id: res_hr_timesheet_employee}: + company_id: base.main_company + name: Employee + login: empt + password: empt + groups_id: + - base.group_user \ No newline at end of file diff --git a/addons/hr_timesheet/test/test_hr_timesheet.yml b/addons/hr_timesheet/test/test_hr_timesheet.yml index 59d688f183b..b9010ce5e53 100644 --- a/addons/hr_timesheet/test/test_hr_timesheet.yml +++ b/addons/hr_timesheet/test/test_hr_timesheet.yml @@ -1,6 +1,11 @@ - In order to test hr_timesheet Module in OpenERP, I make "Sign In/Sign Out for Project" to encode and track time spent on the different projects. +- + Give the access rights of Hr Officer to create employee. +- + !context + uid: 'res_hr_timesheet_officer' - I create employee "Quentin Paolino" as "User". - @@ -9,6 +14,11 @@ name: Quentin Paolino parent_id: 'hr.employee_al' user_id: 'base.user_demo' +- + Give the access rights of Employee to Sign In/Sign Out in Project. +- + !context + uid: 'res_hr_timesheet_employee' - On "Sign In/Sign Out by Project" wizard i click on "Sign In/Sign Out" button of this wizard. -