Files
odoo_source/addons/hr_attendance/data/hr_attendance_demo.xml
T
Denis Vermylen (dve) 96b88b1275 [IMP] hr_attendance: migration and revamp
- Migration to new API
- MODEL : hr.attendance now has check_in and check_out datetimes plus a computed field worked_hours, no more action (in/out) and no more reason.
          hr.employee has extra fields: pin and barcode and can print a badge containing that barcode.
- the module contains : -> a menu "My Attendances" to check yourself in or out manually.
                        -> a menu "Manage Attendances" with 3 submenus:
                              - "Attendances" where you can edit attendances
                              - "Employees" where you have a kanban view of the employees (to see who's checked in or print badges)
                              - "Kiosk Mode": fullscreen, made to be at the entrance of companies to allow
                                 all employees to check in and out, either with a barcode scanner to scan your badge
                                 or by selecting them in a kanban view and checking in or out manually with or without
                                 entering their PIN.  (enable/disable in Configuration)
                        -> a menu "Configuration" where you can change enable/disable PIN use.
- GROUPS : -> HR manager (base.group_hr_manager): full access to the attendance module.
           -> HR officer (base.group_hr_user): full access except the "Configuration" menu.
           -> Manual Attendances (base.group_hr_attendance): only access to the attendance menu "My Attendance" to check in and out manually in the back-end
           -> Employee (base.group_user): has no access to the attendance module. (should only check in and out through the "Kiosk Mode" put at his disposal)
- Views adaptation to the new fields, addition of a presence indicator (green/red dot) to employee kanban and form views.
2016-07-06 16:32:11 +02:00

87 lines
4.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="True">
<record id="hr.employee_al" model="hr.employee">
<field name="pin">0000</field>
<field name="barcode">123</field>
</record>
<record id="hr.employee_root" model="hr.employee">
<field name="pin">0000</field>
<field name="barcode">456</field>
</record>
<record id="attendance_root1" model="hr.attendance">
<field eval="(datetime.now()+relativedelta(days=-1)).strftime('%Y-%m-%d 08:00')" name="check_in"/>
<field eval="(datetime.now()+relativedelta(days=-1)).strftime('%Y-%m-%d 12:00')" name="check_out"/>
<field name="employee_id" ref="hr.employee_root"/>
</record>
<record id="attendance_root2" model="hr.attendance">
<field eval="(datetime.now()+relativedelta(days=-1)).strftime('%Y-%m-%d 13:00')" name="check_in"/>
<field eval="(datetime.now()+relativedelta(days=-1)).strftime('%Y-%m-%d 18:00')" name="check_out"/>
<field name="employee_id" ref="hr.employee_root"/>
</record>
<record id="attendance1" model="hr.attendance">
<field eval="time.strftime('%Y-%m-01 08:21')" name="check_in"/>
<field eval="time.strftime('%Y-%m-01 11:51')" name="check_out"/>
<field name="employee_id" ref="hr.employee_qdp"/>
</record>
<record id="attendance2" model="hr.attendance">
<field eval="time.strftime('%Y-%m-02 12:47')" name="check_in"/>
<field eval="time.strftime('%Y-%m-02 19:53')" name="check_out"/>
<field name="employee_id" ref="hr.employee_qdp"/>
</record>
<record id="attendance3" model="hr.attendance">
<field eval="time.strftime('%Y-%m-03 07:32')" name="check_in"/>
<field eval="time.strftime('%Y-%m-03 12:32')" name="check_out"/>
<field name="employee_id" ref="hr.employee_qdp"/>
</record>
<record id="attendance4" model="hr.attendance">
<field eval="time.strftime('%Y-%m-04 14:01')" name="check_in"/>
<field eval="time.strftime('%Y-%m-04 17:21')" name="check_out"/>
<field name="employee_id" ref="hr.employee_qdp"/>
</record>
<record id="attendance5" model="hr.attendance">
<field eval="time.strftime('%Y-%m-05 09:10')" name="check_in"/>
<field eval="time.strftime('%Y-%m-05 12:42')" name="check_out"/>
<field name="employee_id" ref="hr.employee_qdp"/>
</record>
<record id="attendance6" model="hr.attendance">
<field eval="time.strftime('%Y-%m-06 13:10')" name="check_in"/>
<field eval="time.strftime('%Y-%m-06 18:34')" name="check_out"/>
<field name="employee_id" ref="hr.employee_qdp"/>
</record>
<record id="attendance7" model="hr.attendance">
<field eval="time.strftime('%Y-%m-07 08:21')" name="check_in"/>
<field eval="time.strftime('%Y-%m-07 18:21')" name="check_out"/>
<field name="employee_id" ref="hr.employee_qdp"/>
</record>
<record id="attendance8" model="hr.attendance">
<field eval="time.strftime('%Y-%m-08 08:21')" name="check_in"/>
<field eval="time.strftime('%Y-%m-08 12:54')" name="check_out"/>
<field name="employee_id" ref="hr.employee_qdp"/>
</record>
<record id="attendance9" model="hr.attendance">
<field eval="time.strftime('%Y-%m-09 13:32')" name="check_in"/>
<field eval="time.strftime('%Y-%m-09 19:31')" name="check_out"/>
<field name="employee_id" ref="hr.employee_qdp"/>
</record>
<record id="attendance10" model="hr.attendance">
<field eval="time.strftime('%Y-%m-10 08:00')" name="check_in"/>
<field eval="time.strftime('%Y-%m-10 09:00')" name="check_out"/>
<field name="employee_id" ref="hr.employee_qdp"/>
</record>
</data>
</odoo>