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