diff --git a/yuthon_salary/models/inherit_hr_payslip.py b/yuthon_salary/models/inherit_hr_payslip.py index f26e33010..2f7298df6 100644 --- a/yuthon_salary/models/inherit_hr_payslip.py +++ b/yuthon_salary/models/inherit_hr_payslip.py @@ -194,7 +194,7 @@ class InheritHrPayslip(models.Model): "target": "new", } - @api.depends('year_compute', 'year_jie', 'year_gong', 'jing_te', 'based_pay', 'study_on', 'post_salary', + @api.depends('year_compute', 'year_jie', 'year_gong', 'jing_te', 'study_on', 'post_salary', 'seniority_salary','commuting_allowance', 'full_attendance_award', 'overtime_pay', 'high_temperature_allowance', 'performance_deduction', 'commuting_deduction', 'base_salary_deduction') @@ -211,7 +211,6 @@ class InheritHrPayslip(models.Model): record.year_gong + record.jing_te + record.high_temperature_allowance + - record.based_pay + record.study_on + record.full_attendance_award + record.overtime_pay - diff --git a/yuthon_salary/wizard/payroll_labor_wizard.py b/yuthon_salary/wizard/payroll_labor_wizard.py index bb0a7d346..bb280ae60 100644 --- a/yuthon_salary/wizard/payroll_labor_wizard.py +++ b/yuthon_salary/wizard/payroll_labor_wizard.py @@ -27,10 +27,10 @@ class PayrollLaborWizard(models.Model): def yuthon_payroll_data(self, row): employee_id = self.env['hr.employee'].search([('name', '=', row[0].value)]) current_year = row[1].value - current_month = row[2].value + current_month = str(int(row[2].value)) labor_amount = row[3].value - self.env['yuthon.payroll.retired'].create({ - 'name': employee_id.id, + self.env['yuthon.payroll.labor'].create({ + 'employee_id': employee_id.id, 'current_year': current_year, 'current_month': current_month, 'labor_amount': labor_amount, diff --git a/yuthon_salary/wizard/payroll_retired_wizard.py b/yuthon_salary/wizard/payroll_retired_wizard.py index c384948b8..5fb2af59d 100644 --- a/yuthon_salary/wizard/payroll_retired_wizard.py +++ b/yuthon_salary/wizard/payroll_retired_wizard.py @@ -27,11 +27,11 @@ class PayrollLaborWizard(models.Model): def yuthon_payroll_data(self, row): name = row[0].value current_year = row[1].value - current_month = row[2].value - labor_amount = row[3].value + current_month = str(int(row[2].value)) + retired_amount = row[3].value self.env['yuthon.payroll.retired'].create({ 'name': name, 'current_year': current_year, 'current_month': current_month, - 'labor_amount': labor_amount, + 'retired_amount': retired_amount, }) \ No newline at end of file