From 565fcc6815ecca6a1dd0998c30858a1987d2179a Mon Sep 17 00:00:00 2001 From: zhouzhou <123@qq.com> Date: Wed, 18 Dec 2024 15:47:45 +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 --- .../wizard/yuthon_contract_wizard.py | 10 ++--- yuthon_holiday/views/hr_leave_batch.xml | 2 - yuthon_hr_attendance/views/go_approval.xml | 12 +++--- yuthon_work_brand/views/hr_menus.xml | 39 ++++++++----------- 4 files changed, 27 insertions(+), 36 deletions(-) diff --git a/yuthon_contract/wizard/yuthon_contract_wizard.py b/yuthon_contract/wizard/yuthon_contract_wizard.py index 85a877abc..c771cb157 100644 --- a/yuthon_contract/wizard/yuthon_contract_wizard.py +++ b/yuthon_contract/wizard/yuthon_contract_wizard.py @@ -22,17 +22,17 @@ class YuthonContractWizard(models.Model): raise ValidationError('请上传文件。') book = xlrd.open_workbook(file_contents=base64.decodebytes(self.excel_file)) sh = book.sheet_by_index(0) - for rx in range(1, sh.nrows): + for rx in range(4, sh.nrows): row = sh.row(rx) self.employee_contract_data(row) def employee_contract_data(self,row): employee_id = self.env['hr.employee'].search([('name', '=', row[1].value)]) - structure_type_id = self.env['hr.payroll.structure.type'].search([('name', '=', row[4].value), ('yuthon_company', '=', 'thwg')]) - party_id = self.env['yuthon.party.setting'].search([('party', '=', row[5].value)]) - contract_type_id = self.env['hr.contract.type'].search([('name', '=', row[6].value)]) + structure_type_id = self.env['hr.payroll.structure.type'].search([('name', '=', row[11].value), ('yuthon_company', '=', 'thlc')]) + party_id = self.env['yuthon.party.setting'].search([('party', '=', '广州天河粮食储备管理有限公司')]) + contract_type_id = self.env['hr.contract.type'].search([('name', '=', '正式合同(一签)')]) wage_id = self.env['hr.salary.rule'].search([('struct_id.name', '=', structure_type_id.name), - ('yuthon_company', '=', 'thwg'), + ('yuthon_company', '=', 'thlc'), ('name', '=', '基本工资')]) resource_calendar_id = self.env['resource.calendar'].search([('name', '=', '行政考勤')], limit=1) wage = wage_id.amount_fix diff --git a/yuthon_holiday/views/hr_leave_batch.xml b/yuthon_holiday/views/hr_leave_batch.xml index f980f4706..11309c83a 100644 --- a/yuthon_holiday/views/hr_leave_batch.xml +++ b/yuthon_holiday/views/hr_leave_batch.xml @@ -31,8 +31,6 @@ - - diff --git a/yuthon_hr_attendance/views/go_approval.xml b/yuthon_hr_attendance/views/go_approval.xml index d09299c5f..c86f27bef 100644 --- a/yuthon_hr_attendance/views/go_approval.xml +++ b/yuthon_hr_attendance/views/go_approval.xml @@ -18,6 +18,7 @@
+