summaryrefslogtreecommitdiff
path: root/addons/hr_timesheet
diff options
context:
space:
mode:
authorDenis Ledoux <dle@odoo.com>2017-08-30 10:56:24 +0200
committerJérome Maes <jem@openerp.com>2017-09-01 11:39:17 +0200
commitcdbe2f0ed40b9440a268ab7a2b4142cc7f339bc2 (patch)
treea68b56063d18cb267f7db7af4365f9bcc9f1d6e4 /addons/hr_timesheet
parente818cba321bae6f291d82588bc0788da85c2a2a7 (diff)
[FIX] hr_timesheet: security, do not require all timesheets user to be HR officer.
Regular employees are added to the timesheets user group so they can access to the Timesheets modules. Requiring timesheets users to be HR Officer would almost mean to require all employees to be HR officer, which is not the case. The above is the result of the revision a806f96fa26728f85e169516af6808e9156bcff4 Before, the timesheets user group was the timesheets officer group, and it was the only group for the module timesheets. There were no timesheets manager or user group. This group implied the HR Officer groups, but it made sense as it was the Timesheets Officer group. Now that it is the timesheets user group, it doesn't make sense to imply the HR Officer group.
Diffstat (limited to 'addons/hr_timesheet')
-rw-r--r--addons/hr_timesheet/security/hr_timesheet_security.xml4
-rw-r--r--addons/hr_timesheet/views/hr_views.xml3
2 files changed, 3 insertions, 4 deletions
diff --git a/addons/hr_timesheet/security/hr_timesheet_security.xml b/addons/hr_timesheet/security/hr_timesheet_security.xml
index 23d20ea4fd4..17844a9c91d 100644
--- a/addons/hr_timesheet/security/hr_timesheet_security.xml
+++ b/addons/hr_timesheet/security/hr_timesheet_security.xml
@@ -6,14 +6,14 @@
<record id="group_hr_timesheet_user" model="res.groups">
<field name="name">User</field>
<field name="category_id" ref="base.module_category_hr_timesheet"/>
- <field name="implied_ids" eval="[(4, ref('hr.group_hr_user'))]"/>
+ <field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>
<record id="group_timesheet_manager" model="res.groups">
<field name="name">Manager</field>
<field name="category_id" ref="base.module_category_hr_timesheet"/>
- <field name="implied_ids" eval="[(4, ref('group_hr_timesheet_user'))]"/>
+ <field name="implied_ids" eval="[(4, ref('group_hr_timesheet_user')), (4, ref('hr.group_hr_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>
diff --git a/addons/hr_timesheet/views/hr_views.xml b/addons/hr_timesheet/views/hr_views.xml
index d92c9680c66..53f93849a08 100644
--- a/addons/hr_timesheet/views/hr_views.xml
+++ b/addons/hr_timesheet/views/hr_views.xml
@@ -37,10 +37,9 @@
<field name="name">hr.department.kanban.inherit</field>
<field name="model">hr.department</field>
<field name="inherit_id" ref="hr.hr_department_view_kanban"/>
- <field name="groups_id" eval="[(4,ref('hr_timesheet.group_hr_timesheet_user'))]"/>
+ <field name="groups_id" eval="[(4,ref('hr_timesheet.group_timesheet_manager'))]"/>
<field name="arch" type="xml">
<data>
-
<xpath expr="//div[contains(@class, 'o_kanban_manage_reports')]" position="inside">
<div class="row">
<div class="col-xs-12 text-left">