Merge pull request #5423 from expsa/JAZ-3843
Include “Other” Allowance Type in Employee Termination Report
This commit is contained in:
commit
0d1e6179bf
|
|
@ -21,7 +21,7 @@ class TreminationReport(models.TransientModel):
|
|||
salary_date_from = fields.Date()
|
||||
salary_date_to = fields.Date()
|
||||
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'),
|
||||
('termination', 'Termination'), ('all', 'All')], required=True,
|
||||
default='all', string='Type')
|
||||
|
|
@ -670,6 +670,8 @@ class ReportTerminationPublic(models.AbstractModel):
|
|||
else:
|
||||
data['total_sum']['lave_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)
|
||||
data['total_sum']['ticket_price'] += ticket_price
|
||||
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']['five_year_price'] += minus_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))
|
||||
return data, mykey
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue