From 5a4de7593e243a656a4a78a029782db1f9840cef Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Fri, 25 Jul 2025 11:49:16 +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 --- .../models/hr_employee_page.py | 15 ++++++--- .../models/yuthon_message_login.py | 5 +++ .../security/ir.model.access.csv | 1 + .../views/yuthon_message_login_views.xml | 32 +++++++------------ yuthon_salary/wizard/salary_compute_wizard.py | 16 ++++------ 5 files changed, 35 insertions(+), 34 deletions(-) diff --git a/yuthon_hr_employee_approval/models/hr_employee_page.py b/yuthon_hr_employee_approval/models/hr_employee_page.py index 7adbed663..5c15fd32a 100644 --- a/yuthon_hr_employee_approval/models/hr_employee_page.py +++ b/yuthon_hr_employee_approval/models/hr_employee_page.py @@ -8,12 +8,10 @@ class HrYuthonEmergencyContactLine(models.Model): employee_id = fields.Many2one('hr.employee', string="关联员工") message_login_id = fields.Many2one('yuthon.message.login', string="关联信息登记") name = fields.Char(string="姓名") - user_sfz = fields.Char(string="身份证") user_relationship = fields.Selection([("parents", "父母"), ("children", "子女"), ("spouse", "配偶"), ("spouse", "其他")], string="关系") workplace = fields.Char(string="工作单位") post = fields.Char(string="岗位") phone_number = fields.Char(string="手机号") - home_address = fields.Char(string="家庭住址") class HrYuthonWorkExperienceLine(models.Model): _name = 'hr.yuthon.work.experience.line' @@ -22,12 +20,12 @@ class HrYuthonWorkExperienceLine(models.Model): employee_id = fields.Many2one('hr.employee', string="关联员工") message_login_id = fields.Many2one('yuthon.message.login', string="关联信息登记") start_date = fields.Date(string="开始日期") + department = fields.Char(string="部门") end_date = fields.Date(string="结束日期") work_place = fields.Char(string="工作单位") post = fields.Char(string="岗位") contact_user = fields.Char(string="联系人") phone_number = fields.Char(string="联系人手机号") - reason_leaving = fields.Char(string="离职原因") class HrYuthonEducationExperienceLine(models.Model): @@ -69,7 +67,6 @@ class HrYuthonDirectlyDetailLines(models.Model): ("spouse", "配偶"), ("spouse", "其他")], string="关系") workplace = fields.Char(string='工作单位及职务') phone = fields.Char(string='联系电话') - email = fields.Char(string='邮箱') class HrYuthonMostRecentWorkDetailLine(models.Model): @@ -84,6 +81,16 @@ class HrYuthonMostRecentWorkDetailLine(models.Model): last_training = fields.Char(string='培训') last_work_reason = fields.Char(string='离职原因') + +class AwardsLine(models.Model): + _name = 'awards.line' + _description = "获奖情况" + + message_login_id = fields.Many2one('yuthon.message.login', string="关联信息登记") + name = fields.Char(string='项目') + date = fields.Date(string='时间') + + class YuthonTrialScenarioDetailLine(models.Model): _name = 'yuthon.trial.scenario.detail.line' _description = "试用方案明细行 " diff --git a/yuthon_hr_employee_approval/models/yuthon_message_login.py b/yuthon_hr_employee_approval/models/yuthon_message_login.py index 8a6046fa7..81393dbe0 100644 --- a/yuthon_hr_employee_approval/models/yuthon_message_login.py +++ b/yuthon_hr_employee_approval/models/yuthon_message_login.py @@ -43,6 +43,7 @@ class YuthonMessageLogin(models.Model): working_time = fields.Date(string='参加工作时间') current_address = fields.Char(string='现居住地址') phone = fields.Char(string='手机') + id_card = fields.Char(string='身份证号') residential_phone = fields.Char(string='住宅电话') email = fields.Char(string='电子邮箱') home_address = fields.Char(string='家庭住址') @@ -113,6 +114,10 @@ class YuthonMessageLogin(models.Model): # 最近工作单位 last_work_unit_ids = fields.One2many('hr.yuthon.recent.work.detail.line', 'message_login_id', string="最近工作单位情况") + + # 获奖情况 + awards_line_ids = fields.One2many('awards.line', 'message_login_id', string="获奖情况明细行") + # 亲属在本单位 kindred_line_ids = fields.One2many('kindred.line', 'message_login_id', string="最近工作单位情况") # 附件 diff --git a/yuthon_hr_employee_approval/security/ir.model.access.csv b/yuthon_hr_employee_approval/security/ir.model.access.csv index 46881ac4e..f75be3289 100644 --- a/yuthon_hr_employee_approval/security/ir.model.access.csv +++ b/yuthon_hr_employee_approval/security/ir.model.access.csv @@ -53,3 +53,4 @@ access_department_change_approval_line,department_change_approval_line,model_dep access_department_change_approval_line2,department_change_approval_line2,model_department_change_approval_line2,base.group_user,1,1,1,1 access_yuthon_renewal_approval,yuthon_renewal_approval,model_yuthon_renewal_approval,base.group_user,1,1,1,1 access_contract_review_approval,contract_review_approval,model_contract_review_approval,base.group_user,1,1,1,1 +access_awards_line, awards_line,model_awards_line,base.group_user,1,1,1,1 diff --git a/yuthon_hr_employee_approval/views/yuthon_message_login_views.xml b/yuthon_hr_employee_approval/views/yuthon_message_login_views.xml index 932dad411..b5fcbb506 100644 --- a/yuthon_hr_employee_approval/views/yuthon_message_login_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_message_login_views.xml @@ -54,7 +54,6 @@ - @@ -62,10 +61,10 @@ - + @@ -94,10 +93,17 @@ - - + + + + + + + + + @@ -108,10 +114,10 @@ + - @@ -167,7 +173,7 @@ - + @@ -175,20 +181,6 @@ - - - - - - - - - - - - - - diff --git a/yuthon_salary/wizard/salary_compute_wizard.py b/yuthon_salary/wizard/salary_compute_wizard.py index d56d4cd4f..d42dcb57d 100644 --- a/yuthon_salary/wizard/salary_compute_wizard.py +++ b/yuthon_salary/wizard/salary_compute_wizard.py @@ -274,16 +274,12 @@ class SalaryComputeWizard(models.Model): setattr(internship_id, field_name, result) line.write({'total': result}) - # year = int(self.select_year) - # month = int(self.select_time) - # zhangyun_payslips = self.env['hr.payslip'].search([ - # ('employee_id.name', '=', '张云'), - # ('is_push', '=', False) - # ], limit=1) - # for rec2 in zhangyun_payslips: - # if not self._is_employee_turnover(rec2.employee_id, year, month) and not self._is_employee_in_probation( - # rec2.employee_id, year, month): - # rec2.compute_sheet() + year = int(self.select_year) + month = int(self.select_time) + for rec2 in self.env['hr.payslip'].search(['is_push', '=', False]): + if not self._is_employee_turnover(rec2.employee_id, year, month) and not self._is_employee_in_probation( + rec2.employee_id, year, month): + rec2.compute_sheet() def _get_chinese_month(self, month): chinese_months = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']