From 1fab5f46ac63d386a52aa6521752689f0f7272a9 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Sun, 9 Mar 2025 19:39:30 +0800 Subject: [PATCH 1/3] =?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_hr_attendance/models/hr_attendance_month.py | 4 ++-- yuthon_property_approval/models/property_handover.py | 2 +- yuthon_salary/models/inherit_hr_payroll_structure.py | 6 +++++- yuthon_salary/views/inherit_hr_payroll_structure_views.xml | 1 + 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/yuthon_hr_attendance/models/hr_attendance_month.py b/yuthon_hr_attendance/models/hr_attendance_month.py index a93645174..6c308afaa 100644 --- a/yuthon_hr_attendance/models/hr_attendance_month.py +++ b/yuthon_hr_attendance/models/hr_attendance_month.py @@ -98,7 +98,7 @@ class HrAttendanceMonthDetail(models.Model): leave_of_sick = fields.Integer(string="病假") statutory_leave = fields.Integer(string="法定假") work_overtime = fields.Integer(string="加班") - entry_date = fields.Date(string="入职时间") + entry_date = fields.Date(relatde='employee_id.open_start_time', string="入职时间") expected_date = fields.Date(string="离职日期") cop_leave = fields.Float(string='补休') annual_leave = fields.Float(string='年假') @@ -121,7 +121,7 @@ class HrAttendanceMonthDetail(models.Model): come_late = fields.Integer(string="迟到") is_early_card = fields.Integer(string="早退") is_no_card = fields.Integer(string="缺卡") - is_work = fields.Boolean(string='旷工') + is_work = fields.Integer(string='旷工') # 假期 unpaid_leave = fields.Integer(string="无薪假") diff --git a/yuthon_property_approval/models/property_handover.py b/yuthon_property_approval/models/property_handover.py index 3a1e14210..209f54709 100644 --- a/yuthon_property_approval/models/property_handover.py +++ b/yuthon_property_approval/models/property_handover.py @@ -15,7 +15,7 @@ class PropertyHandover(models.Model): code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('property_handover_code')) property_documents_ids = fields.Many2many('documents.document', string="附件") - source = fields.Char(string="移交单位") + source = fields.Char(string="接收单位") source_time = fields.Date(string="移交时间") is_issues = fields.Boolean(string='是否上会') related_issues_id = fields.Many2one('issue.library', string="关联议题") diff --git a/yuthon_salary/models/inherit_hr_payroll_structure.py b/yuthon_salary/models/inherit_hr_payroll_structure.py index e75e1e554..74f0aa408 100644 --- a/yuthon_salary/models/inherit_hr_payroll_structure.py +++ b/yuthon_salary/models/inherit_hr_payroll_structure.py @@ -124,4 +124,8 @@ class HrPayrollStructure(models.Model): "res_model": "yuthon.payroll.wizard", "view_mode": "form", "target": "new", - } \ No newline at end of file + } + + def clear_salary_rule_data(self): + salary_rules = self.env['hr.salary.rule'].search([]) + salary_rules.unlink() \ No newline at end of file diff --git a/yuthon_salary/views/inherit_hr_payroll_structure_views.xml b/yuthon_salary/views/inherit_hr_payroll_structure_views.xml index e3778bd39..4bd4a3223 100644 --- a/yuthon_salary/views/inherit_hr_payroll_structure_views.xml +++ b/yuthon_salary/views/inherit_hr_payroll_structure_views.xml @@ -19,6 +19,7 @@