From 4ea09c7a85de61f7d50e6a8a7be307792a22ad69 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Mon, 24 Feb 2025 20:51:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_salary/views/inherit_hr_payroll_structure_views.xml | 4 ++-- yuthon_salary/wizard/yuthon_payroll_wizard.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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