Include “Other” Allowance Type in Employee Termination Report
This commit is contained in:
parent
c232517246
commit
4fc9cb3b79
|
|
@ -21,7 +21,7 @@ class TreminationReport(models.TransientModel):
|
||||||
salary_date_from = fields.Date()
|
salary_date_from = fields.Date()
|
||||||
salary_date_to = fields.Date()
|
salary_date_to = fields.Date()
|
||||||
end_date = fields.Date(string='End Of Service')
|
end_date = fields.Date(string='End Of Service')
|
||||||
allowance_ids = fields.Many2many('hr.salary.rule', domain=[('rules_type', 'in', ['house', 'salary', 'transport'])])
|
allowance_ids = fields.Many2many('hr.salary.rule', domain=[('rules_type', 'in', ['house', 'salary', 'transport', 'other'])])
|
||||||
type = fields.Selection(selection=[('salary', 'Salary'), ('ticket', 'Ticket'), ('leave', 'Leave'),
|
type = fields.Selection(selection=[('salary', 'Salary'), ('ticket', 'Ticket'), ('leave', 'Leave'),
|
||||||
('termination', 'Termination'), ('all', 'All')], required=True,
|
('termination', 'Termination'), ('all', 'All')], required=True,
|
||||||
default='all', string='Type')
|
default='all', string='Type')
|
||||||
|
|
@ -670,6 +670,8 @@ class ReportTerminationPublic(models.AbstractModel):
|
||||||
else:
|
else:
|
||||||
data['total_sum']['lave_price'] += lave_price
|
data['total_sum']['lave_price'] += lave_price
|
||||||
data[emp.name]['leave_price'] = lave_price
|
data[emp.name]['leave_price'] = lave_price
|
||||||
|
# Update total to include vacation value
|
||||||
|
data[emp.name]['total'] = total_allowance + lave_price
|
||||||
key_list.append(emp.name)
|
key_list.append(emp.name)
|
||||||
data['total_sum']['ticket_price'] += ticket_price
|
data['total_sum']['ticket_price'] += ticket_price
|
||||||
data['total_sum']['ticket_num'] += ticket_num
|
data['total_sum']['ticket_num'] += ticket_num
|
||||||
|
|
@ -678,7 +680,7 @@ class ReportTerminationPublic(models.AbstractModel):
|
||||||
data['total_sum']['termination_price'] += cause_type_amount
|
data['total_sum']['termination_price'] += cause_type_amount
|
||||||
data['total_sum']['five_year_price'] += minus_five_years_amount
|
data['total_sum']['five_year_price'] += minus_five_years_amount
|
||||||
data['total_sum']['amount'] += plus_five_years_amount
|
data['total_sum']['amount'] += plus_five_years_amount
|
||||||
data['total_sum']['total'] += total_allowance
|
data['total_sum']['total'] += total_allowance + lave_price
|
||||||
mykey = list(dict.fromkeys(key_list))
|
mykey = list(dict.fromkeys(key_list))
|
||||||
return data, mykey
|
return data, mykey
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue