diff --git a/yuthon_hr_attendance/views/all_attendance_menu.xml b/yuthon_hr_attendance/views/all_attendance_menu.xml
index fa51c1325..f9496883b 100644
--- a/yuthon_hr_attendance/views/all_attendance_menu.xml
+++ b/yuthon_hr_attendance/views/all_attendance_menu.xml
@@ -11,10 +11,14 @@
parent="hr_attendance_root_board"
groups="group_he_attendance_user"
sequence="1"/>
-
-
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
+
+
+
+
-
+
-
+ sequence="1"/>
+
-
+
-
-
+
diff --git a/yuthon_hr_employee/models/yuthon_hr_employee.py b/yuthon_hr_employee/models/yuthon_hr_employee.py
index 85f9e67b5..81de8bcee 100644
--- a/yuthon_hr_employee/models/yuthon_hr_employee.py
+++ b/yuthon_hr_employee/models/yuthon_hr_employee.py
@@ -43,7 +43,7 @@ class YuthonHrEmployee(models.Model):
# 个人信息
user_salary = fields.Float(string="基本工资")
job_lv_salary = fields.Float(string="职级工资")
- # entry_date = fields.Date(string="入职时间")
+
user_sex = fields.Selection([('girl', '女'), ('boy', '男')], string="性别")
user_state = fields.Selection([('in', '在职'), ('leave', '离职'), ('withdraw', '退休'), ('borrow', '借调'),
@@ -67,15 +67,23 @@ class YuthonHrEmployee(models.Model):
('part_time', '外地农业'), ('practice', '外地非农业')], string="户籍类型")
duty_replacement_card = fields.Integer(string="值班补卡次数(月)")
# 工作信息
+ entry_date = fields.Date(string="入职时间")
confirmation_date = fields.Date(string="转正时间")
company_old = fields.Char(string="司龄", compute='_compute_company_old')
+
open_start_time = fields.Date(string="参加工作时间")
- social_insurance_date = fields.Date(string="缴纳社保日期")
- social_insurance_time = fields.Char(string="社保时长", compute='_compute_social_insurance_info', store=True)
- compute_month = fields.Integer(string="社保时长假期")
- interrupt_work_month = fields.Integer(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)
+ interrupt_work_month = fields.Integer(string="中断工作月数")
+ compute_char = fields.Char(string="工龄", compute='_compute_social_insurance_info')
+ compute_month = fields.Integer(string="工龄(月)")
+
+ social_insurance_date = fields.Date(string="缴纳社保日期")
+ social_insurance_time = fields.Char(string="社保时长", compute='_compute_social_insurance_info', store=True)
+
+
+
+
# 教育
high_degree = fields.Char(string="最高学历")
high_degree2 = fields.Char(string="最高学位")
@@ -261,6 +269,7 @@ class YuthonHrEmployee(models.Model):
social_insurance_time_str = f"{years}年{months}个月" if years > 0 and months > 0 else (
f"{years}年" if years > 0 else f"{months}个月")
record.social_insurance_time = social_insurance_time_str
+ record.compute_char = social_insurance_time_str
@api.depends('cumulative_work_month')
def _compute_cumulative_work_years(self):
diff --git a/yuthon_hr_employee/views/yuthon_hr_employee_views.xml b/yuthon_hr_employee/views/yuthon_hr_employee_views.xml
index 53c77d1d8..a3ac27adf 100644
--- a/yuthon_hr_employee/views/yuthon_hr_employee_views.xml
+++ b/yuthon_hr_employee/views/yuthon_hr_employee_views.xml
@@ -112,15 +112,17 @@
+
-
-
-
-
+
+
+
+
+
@@ -151,6 +153,7 @@
+
diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py
index 42c2b685c..072a3e79e 100644
--- a/yuthon_property_approval/models/property_lease_contract.py
+++ b/yuthon_property_approval/models/property_lease_contract.py
@@ -83,7 +83,7 @@ class PropertyLeaseContract(models.Model):
first_pay = fields.Date(string="首次付款日")
unit_price = fields.Float(string="单价")
deposit_type = fields.Selection([('deposit', '押金'), ('performance', '履约保证金')], string="押金/履约保证金")
- deposit = fields.Float(string="押金/履约保证金", compute="_compute_deposit", store=True)
+ deposit = fields.Float(string="押金/履约保证金", store=True)
performance_bonds_write = fields.Char(string="履约保证金大写")
first_year_rent = fields.Float(string="首年租金")
rent = fields.Float(string="租金", help='第一笔合同的应收')
@@ -518,8 +518,8 @@ class PropertyLeaseContract(models.Model):
# for record in self:
# record.deposit = record.total_area * record.unit_price * 2 # 月租金
- @api.depends('rent')
- def _compute_deposit(self):
+ @api.onchange('rent')
+ def _onchange_deposit(self):
for record in self:
if record.rent:
record.deposit = record.rent * 2