[FIX] attendances: FIX bug
This commit is contained in:
parent
28c6eb3db6
commit
a71aadfb72
|
|
@ -1220,7 +1220,7 @@ class HrAttendanceTransactions(models.Model):
|
|||
one_extra_dlt = exist_trans and \
|
||||
exist_trans.filtered(
|
||||
lambda t: t.sequence == 1 and t.attending_type == 'out_cal') or False
|
||||
if one_extra_dlt and not shift_one_extra: one_extra_dlt.unlink()
|
||||
if one_extra_dlt and not shift_one_extra: one_extra_dlt.sudo().unlink()
|
||||
one_trans.set_lateness_and_exit(one_trans)
|
||||
if personal_permission_module:
|
||||
if one_trans.temp_lateness or one_trans.temp_exit or one_breaks \
|
||||
|
|
@ -1385,14 +1385,14 @@ class HrAttendanceTransactions(models.Model):
|
|||
one_extra_dlt = exist_trans and \
|
||||
exist_trans.filtered(
|
||||
lambda t: t.sequence == 1 and t.attending_type == 'out_cal') or False
|
||||
if one_extra_dlt and not shift_one_extra: one_extra_dlt.unlink()
|
||||
if one_extra_dlt and not shift_one_extra: one_extra_dlt.sudo().unlink()
|
||||
two_trans = exist_trans and \
|
||||
exist_trans.filtered(
|
||||
lambda t: t.sequence == 2 and t.attending_type == 'in_cal') or two_trans
|
||||
two_extra_dlt = exist_trans and \
|
||||
exist_trans.filtered(
|
||||
lambda t: t.sequence == 2 and t.attending_type == 'out_cal') or False
|
||||
if two_extra_dlt and not shift_two_extra: two_extra_dlt.unlink()
|
||||
if two_extra_dlt and not shift_two_extra: two_extra_dlt.sudo().unlink()
|
||||
if personal_permission_module:
|
||||
if one_trans.temp_lateness or one_trans.temp_exit or one_breaks \
|
||||
or one_trans.sign_in == 0.0 or one_trans.sign_out == 0.0:
|
||||
|
|
|
|||
Loading…
Reference in New Issue