Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12.0][IMP] hr_attendance_rfid: Add record rule #833

Merged
merged 1 commit into from
Oct 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion hr_attendance_rfid/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{
'name': 'HR Attendance RFID',
'version': '12.0.1.0.0',
'version': '12.0.1.1.0',
'category': 'Human Resources',
'website': 'https://github.com/OCA/hr',
'author': 'Comunitea,'
Expand All @@ -19,6 +19,7 @@
'data': [
'security/hr_attendance_rfid.xml',
'security/ir.model.access.csv',
'data/ir_rule.xml',
'views/hr_employee_view.xml',
],
}
15 changes: 15 additions & 0 deletions hr_attendance_rfid/data/ir_rule.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<odoo noupdate="1">

<record id="hr_attendance_rfid_rule" model="ir.rule">
<field name="name">RFID Attendance Rule</field>
<field name="model_id" ref="hr_attendance.model_hr_attendance"/>
<field name="global" eval="False"/>
<field name="domain_force">[(1, '=', 1)]</field>
<field name="groups" eval="[(4, ref('hr_attendance_rfid.group_hr_attendance_rfid'))]"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_unlink" eval="False"/>
</record>

</odoo>
9 changes: 9 additions & 0 deletions hr_attendance_rfid/migrations/12.0.1.1.0/post-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright 2020, Brian McMaster
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
openupgrade.load_data(
env.cr, 'hr_attendance_rfid', 'data/ir_rule.xml')
3 changes: 2 additions & 1 deletion hr_attendance_rfid/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
* Omar Catiñeira Saavedra <omar@comunitea.com>
* Héctor Villarreal Ortega <hector.villarreal@eficent.com>
* Jordi Ballester Alomar <jordi.ballester@eficent.com>
* Jordi Ballester Alomar <jordi.ballester@eficent.com>
* Brian McMaster <brian@mcmpest.com>