-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
247 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
|
||
======================= | ||
HR Timesheet - Security | ||
======================= | ||
|
||
|
||
Installation | ||
============ | ||
|
||
To install this module, you need to: | ||
|
||
1. Clone the branch 8.0 of the repository https://github.com/open-synergy/opnsynid-hr | ||
2. Add the path to this repository in your configuration (addons-path) | ||
3. Update the module list | ||
4. Go to menu *Setting -> Modules -> Local Modules* | ||
5. Search For *HR Timesheet - Security* | ||
6. Install the module | ||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
|
||
* Michael Viriyananda <viriyananda.michael@gmail.com> | ||
* Andhitia Rama <andhitia.r@gmail.com> | ||
* Nurazmi <azmimr67@gmail.com> | ||
|
||
Maintainer | ||
---------- | ||
|
||
.. image:: https://opensynergy-indonesia.com/logo.png | ||
:alt: OpenSynergy Indonesia | ||
:target: https://opensynergy-indonesia.com | ||
|
||
This module is maintained by the OpenSynergy Indonesia. |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2018 OpenSynergy Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2018 OpenSynergy Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
{ | ||
"name": "HR Timesheet - Security", | ||
"version": "8.0.1.0.0", | ||
"category": "Human Resource", | ||
"website": "https://opensynergy-indonesia.com", | ||
"author": "OpenSynergy Indonesia", | ||
"license": "AGPL-3", | ||
"installable": True, | ||
"depends": [ | ||
"hr_timesheet_sheet", | ||
], | ||
"data": [ | ||
"security/ir_module_category_data.xml", | ||
"security/res_groups_data.xml", | ||
"security/ir.model.access.csv", | ||
"security/ir_model_access_data.xml", | ||
"security/ir_rule_data.xml", | ||
"views/hr_timesheet_sheet_sheet_views.xml", | ||
], | ||
} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink | ||
hr_timesheet_sheet_sheet_employee,hr_timesheet_sheet.sheet - Employee,hr_timesheet_sheet.model_hr_timesheet_sheet_sheet,base.group_user,1,0,0,0 | ||
hr_timesheet_sheet_sheet_user,hr_timesheet_sheet.sheet - Timesheet User,hr_timesheet_sheet.model_hr_timesheet_sheet_sheet,group_timesheet_user,1,1,1,1 |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0"?> | ||
<!-- Copyright 2018 OpenSynergy Indonesia | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3.0) --> | ||
<openerp> | ||
<data> | ||
|
||
<record id="hr_timesheet_sheet.access_hr_timesheet_sheet_sheet_user" model="ir.model.access"> | ||
<field name="name">hr_timesheet_sheet.sheet.user</field> | ||
<field name="active" eval="0"/> | ||
</record> | ||
|
||
<record id="hr_timesheet_sheet.access_hr_timesheet_sheet_sheet_system_employee" model="ir.model.access"> | ||
<field name="name">hr_timesheet_sheet.sheet.system.employee</field> | ||
<field name="active" eval="0"/> | ||
</record> | ||
|
||
</data> | ||
</openerp> |
16 changes: 16 additions & 0 deletions
16
hr_timesheet_security/security/ir_module_category_data.xml
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0"?> | ||
<!-- Copyright 2018 OpenSynergy Indonesia | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3.0) --> | ||
<openerp> | ||
<data> | ||
|
||
<record id="module_attendance_timesheet" model="ir.module.category"> | ||
<field name="name">Timesheet</field> | ||
</record> | ||
|
||
<record id="module_attendance_timesheet_visibility" model="ir.module.category"> | ||
<field name="name">Timesheet Visibility</field> | ||
</record> | ||
|
||
</data> | ||
</openerp> |
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 |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright 2018 OpenSynergy Indonesia | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3.0) --> | ||
<openerp> | ||
<data noupdate="0"> | ||
|
||
<!-- Timesheet --> | ||
<record id="hr_timesheet_sheet.timesheet_comp_rule" | ||
model="ir.rule"> | ||
<field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/> | ||
<field name="name"> Timesheet multi-company</field> | ||
<field name="active" eval="0"/> | ||
</record> | ||
|
||
<record id="ir_rule_timesheet_user" | ||
model="ir.rule"> | ||
<field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/> | ||
<field name="domain_force">[ | ||
('employee_id.user_id.id','=',user.id), | ||
]</field> | ||
<field name="name">Timesheet Rule for User</field> | ||
<field name="groups" eval="[(6, 0, [ref('base.group_user')])]"/> | ||
<field eval="1" name="perm_unlink"/> | ||
<field eval="1" name="perm_write"/> | ||
<field eval="1" name="perm_read"/> | ||
<field eval="1" name="perm_create"/> | ||
</record> | ||
|
||
<record id="ir_rule_timesheet_supervisor" | ||
model="ir.rule"> | ||
<field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/> | ||
<field name="domain_force">[ | ||
('employee_id.parent_id.id','child_of',user.employee_ids[0].id), | ||
]</field> | ||
<field name="name">Timesheet Rule for Manager</field> | ||
<field name="groups" eval="[(6, 0, [ref('group_timesheet_supervisor')])]"/> | ||
<field eval="1" name="perm_unlink"/> | ||
<field eval="1" name="perm_write"/> | ||
<field eval="1" name="perm_read"/> | ||
<field eval="1" name="perm_create"/> | ||
</record> | ||
|
||
<record id="ir_rule_timesheet_manager" | ||
model="ir.rule"> | ||
<field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/> | ||
<field name="domain_force">[ | ||
('department_id.manager_id.id','child_of',user.employee_ids[0].id), | ||
]</field> | ||
<field name="name">Timesheet Rule for Department</field> | ||
<field name="groups" eval="[(6, 0, [ref('group_timesheet_department')])]"/> | ||
<field eval="1" name="perm_unlink"/> | ||
<field eval="1" name="perm_write"/> | ||
<field eval="1" name="perm_read"/> | ||
<field eval="1" name="perm_create"/> | ||
</record> | ||
|
||
<record id="ir_rule_timesheet_company" | ||
model="ir.rule"> | ||
<field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/> | ||
<field name="domain_force">[ | ||
('company_id.id','child_of',user.company_id.id), | ||
]</field> | ||
<field name="name">Timesheet Rule for Company</field> | ||
<field name="groups" eval="[(6, 0, [ref('group_timesheet_company')])]"/> | ||
<field eval="1" name="perm_unlink"/> | ||
<field eval="1" name="perm_write"/> | ||
<field eval="1" name="perm_read"/> | ||
<field eval="1" name="perm_create"/> | ||
</record> | ||
|
||
</data> | ||
</openerp> |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0"?> | ||
<!-- Copyright 2018 OpenSynergy Indonesia | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3.0) --> | ||
<openerp> | ||
<data> | ||
|
||
<record id="group_timesheet_user" model="res.groups"> | ||
<field name="name">User</field> | ||
<field name="category_id" ref="hr_timesheet_security.module_attendance_timesheet"/> | ||
<field name="users" eval="[(4, ref('base.user_root'))]"/> | ||
</record> | ||
|
||
<record id="group_timesheet_supervisor" model="res.groups"> | ||
<field name="name">Supervisor</field> | ||
<field name="category_id" ref="hr_timesheet_security.module_attendance_timesheet_visibility"/> | ||
</record> | ||
|
||
<record id="group_timesheet_department" model="res.groups"> | ||
<field name="name">Department</field> | ||
<field name="category_id" ref="hr_timesheet_security.module_attendance_timesheet_visibility"/> | ||
<field name="implied_ids" eval="[(4, ref('group_timesheet_supervisor'))]"/> | ||
</record> | ||
|
||
<record id="group_timesheet_company" model="res.groups"> | ||
<field name="name">Company</field> | ||
<field name="category_id" ref="hr_timesheet_security.module_attendance_timesheet_visibility"/> | ||
<field name="implied_ids" eval="[(4, ref('group_timesheet_department'))]"/> | ||
<field name="users" eval="[(4, ref('base.user_root'))]"/> | ||
</record> | ||
|
||
</data> | ||
</openerp> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions
41
hr_timesheet_security/views/hr_timesheet_sheet_sheet_views.xml
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0"?> | ||
<!-- Copyright 2018 OpenSynergy Indonesia | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3.0) --> | ||
<openerp> | ||
<data> | ||
|
||
<record id="hr_timesheet_sheet_sheet_my_action" model="ir.actions.act_window"> | ||
<field name="name">My Timesheets</field> | ||
<field name="res_model">hr_timesheet_sheet.sheet</field> | ||
<field name="view_type">form</field> | ||
<field name="view_mode">tree,form</field> | ||
<field name="domain">[('user_id','=',uid)]</field> | ||
<field name="search_view_id" ref="hr_timesheet_sheet.view_hr_timesheet_sheet_filter"/> | ||
</record> | ||
|
||
<menuitem | ||
id="hr_timsheet_sheet_sheet_my_menu" | ||
name="My Timesheets" | ||
parent="hr_attendance.menu_hr_time_tracking" | ||
action="hr_timesheet_sheet_sheet_my_action" | ||
groups="base.group_user" | ||
sequence="3"/> | ||
|
||
<record id="hr_timesheet_sheet_sheet_action" model="ir.actions.act_window"> | ||
<field name="name">Timesheets</field> | ||
<field name="res_model">hr_timesheet_sheet.sheet</field> | ||
<field name="view_type">form</field> | ||
<field name="view_mode">tree,form</field> | ||
<field name="search_view_id" ref="hr_timesheet_sheet.view_hr_timesheet_sheet_filter"/> | ||
</record> | ||
|
||
<menuitem | ||
id="hr_timesheet_sheet_sheet_menu" | ||
name="Timesheets" | ||
parent="hr_attendance.menu_hr_time_tracking" | ||
action="hr_timesheet_sheet_sheet_action" | ||
groups="group_timesheet_supervisor,group_timesheet_department,group_timesheet_company" | ||
sequence="4"/> | ||
|
||
</data> | ||
</openerp> |