From 0499c6467fd4cc33998a08ee183b297fbaa780ba 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: Sat, 24 Jan 2026 17:21:45 +0800
Subject: [PATCH 1/2] =?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/models/yuthon_salary_active.py | 6 +++
.../views/yuthon_salary_active_views.xml | 38 ++++---------------
2 files changed, 14 insertions(+), 30 deletions(-)
diff --git a/yuthon_salary/models/yuthon_salary_active.py b/yuthon_salary/models/yuthon_salary_active.py
index a03415e0f..b073b5a78 100644
--- a/yuthon_salary/models/yuthon_salary_active.py
+++ b/yuthon_salary/models/yuthon_salary_active.py
@@ -55,6 +55,7 @@ class YuthonSalaryActive(models.Model):
basic_endowment_insurance = fields.Float(string='基本养老保险费')
basic_medical_insurance = fields.Float(string='基本医疗保险费')
unemployment_insurance = fields.Float(string='失业保险费')
+ insurance = fields.Float(string='保险', compute='_compute_insurance')
housing_fund = fields.Float(string='住房公积金')
enterprise_annuity = fields.Float(string='企业(职业)年金')
personal_payment_total_including_annuity = fields.Float(string='个人缴纳合计(含年金)')
@@ -78,6 +79,11 @@ class YuthonSalaryActive(models.Model):
reimbursed_medical_exam_fee = fields.Float(string='已报销体检费')
remaining_medical_exam_fee = fields.Float(string='剩余体检费')
+ @api.depends("basic_endowment_insurance", "basic_medical_insurance", "unemployment_insurance",)
+ def _compute_insurance(self):
+ for rec in self:
+ rec.insurance = rec.basic_endowment_insurance + rec.basic_medical_insurance + rec.unemployment_insurance
+
def salary_confirm(self):
self.write({'confirm_status': 'confirm'})
diff --git a/yuthon_salary/views/yuthon_salary_active_views.xml b/yuthon_salary/views/yuthon_salary_active_views.xml
index 91569d1f6..7d54a7bea 100644
--- a/yuthon_salary/views/yuthon_salary_active_views.xml
+++ b/yuthon_salary/views/yuthon_salary_active_views.xml
@@ -89,37 +89,15 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
+
+
+
+
+
+
From f6bcbd00864ca59fdab8821d7fc3a36b6f4272a9 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: Sat, 24 Jan 2026 17:24:03 +0800
Subject: [PATCH 2/2] =?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/yuthon_salary_active_views.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/yuthon_salary/views/yuthon_salary_active_views.xml b/yuthon_salary/views/yuthon_salary_active_views.xml
index 7d54a7bea..84482cc1b 100644
--- a/yuthon_salary/views/yuthon_salary_active_views.xml
+++ b/yuthon_salary/views/yuthon_salary_active_views.xml
@@ -61,7 +61,7 @@
-
+
@@ -91,7 +91,7 @@
-
+