diff --git a/yuthon_salary/views/inherit_hr_payroll_structure_views.xml b/yuthon_salary/views/inherit_hr_payroll_structure_views.xml index 09056514c..01b534c18 100644 --- a/yuthon_salary/views/inherit_hr_payroll_structure_views.xml +++ b/yuthon_salary/views/inherit_hr_payroll_structure_views.xml @@ -28,8 +28,8 @@ - - + + diff --git a/yuthon_salary/wizard/yuthon_payroll_wizard.py b/yuthon_salary/wizard/yuthon_payroll_wizard.py index 395ef4352..cdf16c9ee 100644 --- a/yuthon_salary/wizard/yuthon_payroll_wizard.py +++ b/yuthon_salary/wizard/yuthon_payroll_wizard.py @@ -42,7 +42,7 @@ class YuthonPayrollWizard(models.Model): performance_bonus = row[3].value communication_subsidy = row[4].value full_attendance_bonus = row[5].value - payroll_id = self.env['hr.payroll.structure'].search([('type_id', '=', type_id.id), ('yuthon_company', '=','thtz')]) + payroll_id = self.env['hr.payroll.structure'].search([('type_id', '=', type_id.id), ('yuthon_company', '=','thtz')], limit=1) if payroll_id: payroll_id.write({ 'base_salary': base_salary, @@ -59,7 +59,7 @@ class YuthonPayrollWizard(models.Model): integrated_subsidy = row[3].value communication_subsidy = row[4].value full_attendance_bonus = row[5].value - payroll_id = self.env['hr.payroll.structure'].search([('type_id', '=', type_id.id), ('yuthon_company', '=','thwg')]) + payroll_id = self.env['hr.payroll.structure'].search([('type_id', '=', type_id.id), ('yuthon_company', '=','thwg')], limit=1) if payroll_id: payroll_id.write({ 'base_salary': base_salary, @@ -70,7 +70,7 @@ class YuthonPayrollWizard(models.Model): }) def yuthon_payroll_lc_data(self, row): - type_id = self.env['hr.payroll.structure.type'].search([('name', '=', row[0].value)]) + type_id = self.env['hr.payroll.structure.type'].search([('name', '=', row[0].value)], limit=1) base_salary = row[1].value position_subsidy = row[2].value position_salary = row[3].value