fix leave
This commit is contained in:
parent
96e071f7a1
commit
b8ab6f6a1d
|
|
@ -120,11 +120,14 @@ class LeaveController(http.Controller):
|
|||
hol_type = []
|
||||
if status:
|
||||
for s in status:
|
||||
records = balance.filtered(
|
||||
lambda r: r.holiday_status_id == s)
|
||||
value = {'id': s.id, 'name': s.name or "", 'ticket': s.issuing_ticket,
|
||||
'balance': records[0].remaining_leaves if records else 0,
|
||||
'alternative_chick': s.alternative_chick}
|
||||
records = balance.filtered(lambda r: r.holiday_status_id == s)
|
||||
value = {
|
||||
"id": s.id,
|
||||
"name": s.with_context({"employee_id": employee.id}).name_get()[0][1] or "",
|
||||
"ticket": s.issuing_ticket,
|
||||
"balance": records[0].remaining_leaves if records else 0,
|
||||
"alternative_chick": s.alternative_chick,
|
||||
}
|
||||
hol_type.append(value)
|
||||
li = []
|
||||
if balance:
|
||||
|
|
|
|||
Loading…
Reference in New Issue