[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
a806f96fa2
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.
This commit is contained in:
committed by
Jérome Maes
parent
e818cba321
commit
cdbe2f0ed4
@@ -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>
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<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="//templates" position="before">
|
||||
|
||||
@@ -58,9 +58,9 @@
|
||||
<form string="Timesheet">
|
||||
<header>
|
||||
<button name="action_timesheet_confirm" states="draft" string="Submit to Manager" type="object" class="oe_highlight"/>
|
||||
<button name="action_timesheet_done" states="confirm" string="Approve" type="object" groups="hr_timesheet.group_hr_timesheet_user" class="oe_highlight"/>
|
||||
<button name="action_timesheet_draft" states="done" string="Set to Draft" type="object" groups="hr_timesheet.group_hr_timesheet_user"/>
|
||||
<button name="action_timesheet_draft" states="confirm" string="Refuse" type="object" groups="hr_timesheet.group_hr_timesheet_user"/>
|
||||
<button name="action_timesheet_done" states="confirm" string="Approve" type="object" groups="hr_timesheet.group_timesheet_manager" class="oe_highlight"/>
|
||||
<button name="action_timesheet_draft" states="done" string="Set to Draft" type="object" groups="hr_timesheet.group_timesheet_manager"/>
|
||||
<button name="action_timesheet_draft" states="confirm" string="Refuse" type="object" groups="hr_timesheet.group_timesheet_manager"/>
|
||||
<field name="state" widget="statusbar" statusbar_visible="new,confirm,done"/>
|
||||
</header>
|
||||
<sheet>
|
||||
@@ -190,7 +190,7 @@
|
||||
<menuitem id="menu_hr_to_approve" name="To Approve" parent="hr_timesheet.timesheet_menu_root" sequence="7"/>
|
||||
|
||||
<menuitem action="act_hr_timesheet_sheet_form" id="menu_act_hr_timesheet_sheet_form" parent="menu_hr_to_approve"
|
||||
sequence="11" groups="hr_timesheet.group_hr_timesheet_user"/>
|
||||
sequence="11" groups="hr_timesheet.group_timesheet_manager"/>
|
||||
|
||||
<!--
|
||||
account.analytic.line inheritancy
|
||||
@@ -238,7 +238,7 @@
|
||||
type="action"
|
||||
class="oe_stat_button"
|
||||
icon="fa-clock-o"
|
||||
groups="hr_timesheet.group_hr_timesheet_user">
|
||||
groups="hr_timesheet.group_timesheet_manager">
|
||||
<field name="timesheet_count" widget="statinfo" string="Timesheets"/>
|
||||
</button>
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user