fix bug
This commit is contained in:
parent
cb2001662d
commit
e4dd586cef
|
|
@ -12,6 +12,7 @@ class SystemAttendance(models.Model):
|
||||||
_order = 'punch_time DESC'
|
_order = 'punch_time DESC'
|
||||||
|
|
||||||
punch_state = fields.Char("Punch state", readonly=True)
|
punch_state = fields.Char("Punch state", readonly=True)
|
||||||
|
punch_state_display = fields.Char("Punch state display", readonly=True)
|
||||||
area_alias = fields.Char("Area", readonly=True)
|
area_alias = fields.Char("Area", readonly=True)
|
||||||
crc = fields.Char("CRC", readonly=True)
|
crc = fields.Char("CRC", readonly=True)
|
||||||
verify_type = fields.Integer("Verify type", readonly=True)
|
verify_type = fields.Integer("Verify type", readonly=True)
|
||||||
|
|
@ -551,6 +552,7 @@ class BiotimeAPI(models.Model):
|
||||||
data = {
|
data = {
|
||||||
'attendance_id': tx['id'],
|
'attendance_id': tx['id'],
|
||||||
'punch_state': tx['punch_state'],
|
'punch_state': tx['punch_state'],
|
||||||
|
'punch_state_display': tx['punch_state_display'],
|
||||||
'area_alias': tx['area_alias'],
|
'area_alias': tx['area_alias'],
|
||||||
# 'crc': tx['crc'],
|
# 'crc': tx['crc'],
|
||||||
'crc': tx['emp'],
|
'crc': tx['emp'],
|
||||||
|
|
|
||||||
|
|
@ -222,6 +222,7 @@
|
||||||
<field name="attendance_id"/>
|
<field name="attendance_id"/>
|
||||||
<field name="punch_time"/>
|
<field name="punch_time"/>
|
||||||
<field name="punch_state"/>
|
<field name="punch_state"/>
|
||||||
|
<field name="punch_state_display"/>
|
||||||
<field name="area_alias"/>
|
<field name="area_alias"/>
|
||||||
<field name="verify_type"/>
|
<field name="verify_type"/>
|
||||||
<field name="terminal_id"/>
|
<field name="terminal_id"/>
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ class AttendanceWizard(models.TransientModel):
|
||||||
attendance.create({
|
attendance.create({
|
||||||
'employee_id': tx.emp_code.hr_employee.id,
|
'employee_id': tx.emp_code.hr_employee.id,
|
||||||
'name': tx.punch_time,
|
'name': tx.punch_time,
|
||||||
'action': 'sign_in' if tx.punch_state in ["1", "4", "5"] else 'sign_out',
|
'action': 'sign_in' if tx.punch_state in ["0", "2", "4"] else 'sign_out',
|
||||||
'action_date': tx.punch_time,
|
'action_date': tx.punch_time,
|
||||||
})
|
})
|
||||||
tx.write({
|
tx.write({
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue