-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
verdigado_attendance: allow manager again to read employees attendances
- Loading branch information
Showing
5 changed files
with
36 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
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
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 @@ | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
from . import hr_attendance |
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,11 @@ | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
# | ||
# dummy model to allow verdigado_hr_attendance_rule_attendance_manager rule | ||
# | ||
|
||
from odoo import _, api, fields, models | ||
from odoo.exceptions import UserError | ||
|
||
class HrAttendance(models.Model): | ||
_inherit = "hr.attendance" |
17 changes: 17 additions & 0 deletions
17
verdigado_attendance/security/hr_attendance_rule_attendance_manager.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,17 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<odoo> | ||
<record id="verdigado_hr_attendance_rule_attendance_manager" model="ir.rule"> | ||
<field | ||
name="name" | ||
>verdigado: allow Manager read employee's attendance</field> | ||
<field name="model_id" ref="model_hr_attendance" /> | ||
<field | ||
name="domain_force" | ||
>['|', '|', ('employee_id.user_id','=',user.id), ('employee_id.parent_id.user_id','=',user.id), ('attendance_admin.user_id','=',user.id)]</field> | ||
<field name="perm_read" eval="True" /> | ||
<field name="perm_write" eval="True" /> | ||
<field name="perm_create" eval="True" /> | ||
<field name="perm_unlink" eval="False" /> | ||
<field name="groups" eval="[(4,ref('hr_attendance.group_hr_attendance'))]" /> | ||
</record> | ||
</odoo> |