From cf5c75da7b60c26a7465ed5721c8565172e83718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Tue, 30 Jun 2026 17:18:41 +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_hr_employee/models/yuthon_hr_employee.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/yuthon_hr_employee/models/yuthon_hr_employee.py b/yuthon_hr_employee/models/yuthon_hr_employee.py index 9824ca5c4..53c9685e1 100644 --- a/yuthon_hr_employee/models/yuthon_hr_employee.py +++ b/yuthon_hr_employee/models/yuthon_hr_employee.py @@ -101,8 +101,8 @@ class YuthonHrEmployee(models.Model): regularization_year = fields.Integer(string="转正(年)", compute='_compute_regularization_year') open_start_time = fields.Date(string="参加工作时间") is_membership = fields.Boolean(string="工会会员") - cumulative_work_month = fields.Integer(string="累计工作月数", compute='_compute_social_insurance_info', store=True) - cumulative_work_years = fields.Char(string="累计工作年限", compute='_compute_cumulative_work_years', store=True) + cumulative_work_month = fields.Integer(string="累计工作月数", compute='_compute_social_insurance_info') + cumulative_work_years = fields.Char(string="累计工作年限", compute='_compute_cumulative_work_years') interrupt_work_month = fields.Integer(string="中断工作月数") compute_char = fields.Char(string="工龄", compute='_compute_social_insurance_info') compute_month = fields.Integer(string="工龄(月)") @@ -968,7 +968,6 @@ class YuthonHrEmployee(models.Model): f"{years}年" if years > 0 else f"{months}个月") record.social_insurance_time = social_insurance_time_str record.compute_char = social_insurance_time_str - record._compute_cumulative_work_years() @api.depends('cumulative_work_month') def _compute_cumulative_work_years(self):