From a446dfb18e151f53539e7a4283504319a73e27b1 Mon Sep 17 00:00:00 2001 From: "DBR (OpenERP)" Date: Tue, 3 Aug 2010 18:41:17 +0530 Subject: [PATCH] [MOD] hr_* :Improvement in hr_* modules groups and accessright bzr revid: dbr@tinyerp.com-20100803131117-jkvf2a7pe955en2u --- addons/hr/hr_department_view.xml | 1 - addons/hr/hr_view.xml | 6 ++---- addons/hr/security/hr_security.xml | 4 ++-- addons/hr/security/ir.model.access.csv | 18 +++++++++++------- addons/hr_attendance/hr_attendance_view.xml | 3 +-- .../hr_attendance/security/ir.model.access.csv | 3 ++- .../wizard/hr_attendance_sign_in_out_view.xml | 2 +- .../hr_contract/security/ir.model.access.csv | 16 ++++++---------- addons/hr_evaluation/hr_evaluation_view.xml | 10 ++++------ .../hr_evaluation/security/ir.model.access.csv | 16 +++++++++------- addons/hr_expense/hr_expense_view.xml | 5 ++--- addons/hr_expense/security/ir.model.access.csv | 10 +++++++--- addons/hr_holidays/hr_holidays_view.xml | 3 +-- .../hr_holidays/security/ir.model.access.csv | 16 ++++++++-------- .../security/ir.model.access.csv | 8 ++++---- addons/hr_timesheet/hr_timesheet_view.xml | 1 - .../hr_timesheet/security/ir.model.access.csv | 10 ++++++---- .../wizard/hr_timesheet_print_users_view.xml | 2 +- addons/survey/security/ir.model.access.csv | 13 +++++++++++++ addons/survey/security/survey_security.xml | 6 ++++++ 20 files changed, 86 insertions(+), 67 deletions(-) diff --git a/addons/hr/hr_department_view.xml b/addons/hr/hr_department_view.xml index 1b96956394f..29e3b04f2c9 100644 --- a/addons/hr/hr_department_view.xml +++ b/addons/hr/hr_department_view.xml @@ -72,7 +72,6 @@ hr.department form - Your Company's Departments Structure is used to manage all documents related to employees by departments: expenses and timesheet validation, leaves management, recruitements, etc. diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml index 6d826db1a6b..e803bf3221b 100644 --- a/addons/hr/hr_view.xml +++ b/addons/hr/hr_view.xml @@ -4,8 +4,8 @@ - - + + diff --git a/addons/hr_evaluation/security/ir.model.access.csv b/addons/hr_evaluation/security/ir.model.access.csv index a58c3298617..104fdf152c6 100644 --- a/addons/hr_evaluation/security/ir.model.access.csv +++ b/addons/hr_evaluation/security/ir.model.access.csv @@ -1,8 +1,10 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_hr_evaluation_evaluation","hr_evaluation.evaluation","model_hr_evaluation_evaluation","hr.group_hr_user",1,1,1,1 -"access_hr_evaluation_plan","hr_evaluation.plan","model_hr_evaluation_evaluation","hr.group_hr_user",1,0,0,0 -"access_hr_evaluation_plan_manager","hr_evaluation.plan","model_hr_evaluation_plan","hr.group_hr_manager",1,1,1,1 -"access_hr_evaluation_plan_phase","hr_evaluation.plan.phase","model_hr_evaluation_plan_phase","hr.group_hr_user",1,0,0,0 -"access_hr_evaluation_plan_phase_manager","hr_evaluation.plan.phase","model_hr_evaluation_plan_phase","hr.group_hr_manager",1,1,1,1 -"access_hr_evaluation_interview","hr.evaluation.interview","model_hr_evaluation_interview","hr.group_hr_user",1,1,1,1 -"access_hr_evaluation_report","hr.evaluation.report","model_hr_evaluation_report","hr.group_hr_manager",1,1,1,1 +"access_hr_evaluation_evaluation","hr_evaluation.evaluation","model_hr_evaluation_evaluation","base.group_hr_user",1,1,1,1 +"access_hr_evaluation_evaluation_manager","hr_evaluation.evaluation","model_hr_evaluation_evaluation","base.group_hr_manager",1,1,1,1 +"access_hr_evaluation_plan","hr_evaluation.plan","model_hr_evaluation_evaluation","base.group_hr_user",1,0,0,0 +"access_hr_evaluation_plan_manager","hr_evaluation.plan","model_hr_evaluation_plan","base.group_hr_manager",1,1,1,1 +"access_hr_evaluation_plan_phase","hr_evaluation.plan.phase","model_hr_evaluation_plan_phase","base.group_hr_user",1,0,0,0 +"access_hr_evaluation_plan_phase_manager","hr_evaluation.plan.phase","model_hr_evaluation_plan_phase","base.group_hr_manager",1,1,1,1 +"access_hr_evaluation_interview","hr.evaluation.interview","model_hr_evaluation_interview","base.group_hr_user",1,1,1,1 +"access_hr_evaluation_interview_manager","hr.evaluation.interview","model_hr_evaluation_interview","base.group_hr_manager",1,1,1,1 +"access_hr_evaluation_report","hr.evaluation.report","model_hr_evaluation_report","base.group_hr_manager",1,1,1,1 diff --git a/addons/hr_expense/hr_expense_view.xml b/addons/hr_expense/hr_expense_view.xml index 0e4a1c34095..820c67da6dc 100644 --- a/addons/hr_expense/hr_expense_view.xml +++ b/addons/hr_expense/hr_expense_view.xml @@ -158,11 +158,10 @@ form {"search_default_user_id":uid} - The OpenERP expenses management module allows you to track the full flow. Every month, the employees record their expenses. At the end of the month, their managers validates the expenses sheets which creates costs on projects/analytic accounts. The accountant validates the proposed entries and the employee can be reimbursed. You can also reinvoice the customer at the end of the flow. - - + + product.product.expense.form diff --git a/addons/hr_expense/security/ir.model.access.csv b/addons/hr_expense/security/ir.model.access.csv index c6f2cdef8d1..ffccde210f9 100644 --- a/addons/hr_expense/security/ir.model.access.csv +++ b/addons/hr_expense/security/ir.model.access.csv @@ -1,4 +1,8 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_hr_expense_expense","hr.expense.expense","model_hr_expense_expense","hr.group_hr_user",1,1,1,1 -"access_hr_expense_line","hr.expense.line","model_hr_expense_line","hr.group_hr_user",1,1,1,1 -"access_hr_expense_report","hr.expense.report","model_hr_expense_report","hr.group_hr_manager",1,1,1,1 +"access_hr_expense_expense","hr.expense.expense","model_hr_expense_expense","base.group_hr_user",1,1,1,1 +"access_hr_expense_line","hr.expense.line","model_hr_expense_line","base.group_hr_user",1,1,1,1 +"access_hr_expense_report","hr.expense.report","model_hr_expense_report","base.group_hr_manager",1,1,1,1 +"access_product_product_hr_expense","product.product.hr.expense","product.model_product_product","base.group_hr_user",1,0,0,0 +"access_product_template_hr_expense","product.template.hr.expense","product.model_product_template","base.group_hr_user",1,0,0,0 +"access_product_uom_hr_expense","product.uom.hr.expense","product.model_product_uom","base.group_hr_user",1,0,0,0 +"access_product_price_type","product.price.type","product.model_product_price_type","base.group_hr_user",1,1,1,1 diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml index 73aedac2c5f..f0d312bd9b4 100644 --- a/addons/hr_holidays/hr_holidays_view.xml +++ b/addons/hr_holidays/hr_holidays_view.xml @@ -253,7 +253,6 @@ [('type','=','remove')] {'search_default_user_id':uid} - Leaves requests can be recorded by employees and validated by their managers. Once a leave request is validated it appears automatically in the agenda of the employee. You can define several allowance types (paid holidays, sickness, etc) and manage allowances per type. @@ -314,7 +313,7 @@ parent="menu_open_ask_holidays" id="menu_open_company_allocation" action="open_company_allocation" - groups="hr.group_hr_manager" + groups="base.group_hr_manager" sequence="40"/> diff --git a/addons/hr_holidays/security/ir.model.access.csv b/addons/hr_holidays/security/ir.model.access.csv index aee09a1f831..279eb8a7c1d 100644 --- a/addons/hr_holidays/security/ir.model.access.csv +++ b/addons/hr_holidays/security/ir.model.access.csv @@ -1,9 +1,9 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_hr_holydays_status_user","hr.holidays.status user","model_hr_holidays_status","hr.group_hr_user",1,0,0,0 -"access_hr_holidays_user","hr holidays user","model_hr_holidays","hr.group_hr_user",1,1,1,0 -"access_hr_holydays_status_manager","hr.holidays.status manager","model_hr_holidays_status","hr.group_hr_manager",1,1,1,1 -"access_hr_holidays_manager","hr holidays manager","model_hr_holidays","hr.group_hr_manager",1,1,1,1 -"access_hr_holidays_remain","hr holidays user","model_hr_holidays_remaining_leaves_user","hr.group_hr_user",1,0,0,0 -"access_hr_holidays_report","hr.holidays.report","model_hr_holidays_report","hr.group_hr_manager",1,1,1,1 -"access_hr_holidays_remaining_leaves_user","hr.hr.holidays.remaining.leaves.user","model_hr_holidays_remaining_leaves_user","hr.group_hr_manager",1,1,1,1 -"access_available_holidays_report","hr.available.holidays.report","model_available_holidays_report","hr.group_hr_manager",1,1,1,1 +"access_hr_holydays_status_user","hr.holidays.status user","model_hr_holidays_status","base.group_hr_user",1,0,0,0 +"access_hr_holidays_user","hr holidays user","model_hr_holidays","base.group_hr_user",1,1,1,0 +"access_hr_holydays_status_manager","hr.holidays.status manager","model_hr_holidays_status","base.group_hr_manager",1,1,1,1 +"access_hr_holidays_manager","hr holidays manager","model_hr_holidays","base.group_hr_manager",1,1,1,1 +"access_hr_holidays_remain","hr holidays user","model_hr_holidays_remaining_leaves_user","base.group_hr_user",1,0,0,0 +"access_hr_holidays_report","hr.holidays.report","model_hr_holidays_report","base.group_hr_manager",1,1,1,1 +"access_hr_holidays_remaining_leaves_user","hr.hr.holidays.remaining.leaves.user","model_hr_holidays_remaining_leaves_user","base.group_hr_manager",1,1,1,1 +"access_available_holidays_report","hr.available.holidays.report","model_available_holidays_report","base.group_hr_manager",1,1,1,1 diff --git a/addons/hr_recruitment/security/ir.model.access.csv b/addons/hr_recruitment/security/ir.model.access.csv index bad86afd5c0..b951e28a74b 100644 --- a/addons/hr_recruitment/security/ir.model.access.csv +++ b/addons/hr_recruitment/security/ir.model.access.csv @@ -1,5 +1,5 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_hr_applicant","hr.applicant","model_hr_applicant","hr.group_hr_user",1,1,1,1 -"access_hr_recruitment_report","hr.recruitment.report","model_hr_recruitment_report","hr.group_hr_manager",1,0,0,0 -"access_hr_recruitment_stage","hr.recruitment.stage","model_hr_recruitment_stage","hr.group_hr_user",1,1,1,1 -"access_hr_recruitment_degree","hr.recruitment.degree","model_hr_recruitment_degree","hr.group_hr_user",1,1,1,1 +"access_hr_applicant","hr.applicant","model_hr_applicant","base.group_hr_user",1,1,1,1 +"access_hr_recruitment_report","hr.recruitment.report","model_hr_recruitment_report","base.group_hr_manager",1,0,0,0 +"access_hr_recruitment_stage","hr.recruitment.stage","model_hr_recruitment_stage","base.group_hr_user",1,1,1,1 +"access_hr_recruitment_degree","hr.recruitment.degree","model_hr_recruitment_degree","base.group_hr_user",1,1,1,1 diff --git a/addons/hr_timesheet/hr_timesheet_view.xml b/addons/hr_timesheet/hr_timesheet_view.xml index d612706257f..f6527d5c6e8 100644 --- a/addons/hr_timesheet/hr_timesheet_view.xml +++ b/addons/hr_timesheet/hr_timesheet_view.xml @@ -83,7 +83,6 @@ tree,form {"search_default_user_id":uid} - This functionality gives you a list of work done by user, product and analytic account (or project). A search tool allows you to make fine-grained analysis. diff --git a/addons/hr_timesheet/security/ir.model.access.csv b/addons/hr_timesheet/security/ir.model.access.csv index 2ae7f12464a..ad3583bfab9 100644 --- a/addons/hr_timesheet/security/ir.model.access.csv +++ b/addons/hr_timesheet/security/ir.model.access.csv @@ -1,5 +1,7 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_hr_analytic_timesheet","hr.analytic.timesheet","model_hr_analytic_timesheet","hr.group_hr_user",1,1,1,1 -"access_hr_account_analytic_line","account.account.analytic.line","account.model_account_analytic_line","hr.group_hr_user",1,1,1,0 -"access_account_analytic_journal","account.account.analytic.journal","account.model_account_analytic_journal","hr.group_hr_user",1,0,0,0 -"access_product_product_user","product.product user","product.model_product_product","hr.group_hr_user",1,0,0,0 +"access_hr_analytic_timesheet","hr.analytic.timesheet","model_hr_analytic_timesheet","base.group_hr_user",1,1,1,1 +"access_hr_account_analytic_line","account.account.analytic.line","account.model_account_analytic_line","base.group_hr_user",1,1,1,0 +"access_account_analytic_journal","account.account.analytic.journal","account.model_account_analytic_journal","base.group_hr_user",1,0,0,0 +"access_product_product_user","product.product user","product.model_product_product","base.group_hr_user",1,0,0,0 +"access_product_template_hr_timesheet","product.template.hr.timesheet","product.model_product_template","base.group_hr_user",1,0,0,0 +"access_product_uom_hr_timesheet","product.uom.hr.timesheet","product.model_product_uom","base.group_hr_user",1,0,0,0 diff --git a/addons/hr_timesheet/wizard/hr_timesheet_print_users_view.xml b/addons/hr_timesheet/wizard/hr_timesheet_print_users_view.xml index cb51fcc1cb3..d71946abfd9 100644 --- a/addons/hr_timesheet/wizard/hr_timesheet_print_users_view.xml +++ b/addons/hr_timesheet/wizard/hr_timesheet_print_users_view.xml @@ -38,7 +38,7 @@ + groups="base.group_hr_manager" sequence="3" icon="STOCK_PRINT"/> diff --git a/addons/survey/security/ir.model.access.csv b/addons/survey/security/ir.model.access.csv index 22902858577..aebd468c0a0 100644 --- a/addons/survey/security/ir.model.access.csv +++ b/addons/survey/security/ir.model.access.csv @@ -23,3 +23,16 @@ "access_survey_response_line","survey.response.line","model_survey_response_line","group_survey_manager",1,1,1,1 "access_survey_response_line","survey.response.line","model_survey_response_line","group_survey_user",1,1,1,1 "access_survey_name_wiz_sale","survey.name.wiz.sale","model_survey_name_wiz","base.group_sale_salesman",1,1,0,0 +"access_survey_type","survey.type","model_survey_type","base.group_hr_manager",1,1,1,1 +"access_survey","survey","model_survey","base.group_hr_manager",1,1,1,1 +"access_survey_history","survey.history","model_survey_history","base.group_hr_manager",1,1,1,1 +"access_survey_page","survey.page","model_survey_page","base.group_hr_manager",1,1,1,1 +"access_survey_question","survey.question","model_survey_question","base.group_hr_manager",1,1,1,1 +"access_survey_question_column_heading","survey.question.column.heading","model_survey_question_column_heading","base.group_hr_manager",1,1,1,1 +"access_survey_answer","survey.answer","model_survey_answer","base.group_hr_manager",1,1,1,1 +"access_survey_response","survey.response","model_survey_response","base.group_hr_manager",1,1,1,1 +"access_survey_response_line","survey.response.line","model_survey_response_line","base.group_hr_manager",1,1,1,1 +"access_survey_tbl_column_heading","survey.tbl.column.heading","model_survey_tbl_column_heading","base.group_hr_manager",1,1,1,1 +"access_survey_response_answer","survey.response.answer","model_survey_response_answer","base.group_hr_manager",1,1,1,1 +"access_survey_res_users","res.users","base.model_res_users","base.group_hr_manager",1,1,1,1 +"access_survey_request","survey.request","model_survey_request","base.group_hr_manager",1,1,1,1 diff --git a/addons/survey/security/survey_security.xml b/addons/survey/security/survey_security.xml index d85df3508b7..67494b5a293 100644 --- a/addons/survey/security/survey_security.xml +++ b/addons/survey/security/survey_security.xml @@ -5,6 +5,12 @@ Sales / Salesman + + Human Resources / Manager + + + Human Resources / User +