diff --git a/yuthon_contract/views/inherit_hr_contract_views.xml b/yuthon_contract/views/inherit_hr_contract_views.xml
index 56bd24196..9f0202dd3 100644
--- a/yuthon_contract/views/inherit_hr_contract_views.xml
+++ b/yuthon_contract/views/inherit_hr_contract_views.xml
@@ -8,11 +8,11 @@
-
- 用工形式
+
+
- 合同名称
+ 1
diff --git a/yuthon_issue/views/inherit_room_booking.xml b/yuthon_issue/views/inherit_room_booking.xml
index f91db9f20..088ebb677 100644
--- a/yuthon_issue/views/inherit_room_booking.xml
+++ b/yuthon_issue/views/inherit_room_booking.xml
@@ -16,7 +16,6 @@
-
diff --git a/yuthon_property/models/yuthon_property.py b/yuthon_property/models/yuthon_property.py
index 73823fca0..e195135c7 100644
--- a/yuthon_property/models/yuthon_property.py
+++ b/yuthon_property/models/yuthon_property.py
@@ -370,7 +370,7 @@ class TitleInformationLine(models.Model):
equity_area = fields.Float(related='property_message_id.equity_area', string="产权面积", digits=(16, 4))
registered_id = fields.Many2one(related='property_message_id.registered_id', string='证载用途')
property_use_time = fields.Selection(related='property_message_id.property_use_time', string="产权年限")
- life_timer = fields.Datetime(related='property_message_id.life_timer', string="使用时间")
+ life_timer = fields.Date(related='property_message_id.life_timer', string="使用时间")
title_certificate = fields.Char(related='property_message_id.title_certificate', string="产权证号")
start_time = fields.Date(string="生效日期", default=fields.Date.today)
diff --git a/yuthon_property/models/yuthon_property_message.py b/yuthon_property/models/yuthon_property_message.py
index 587d514b6..80a713314 100644
--- a/yuthon_property/models/yuthon_property_message.py
+++ b/yuthon_property/models/yuthon_property_message.py
@@ -13,6 +13,6 @@ class YuthonPropertyMessage(models.Model):
ctual_area = fields.Float(string="实际面积", digits=(16, 4))
equity_area = fields.Float(string="产权面积", digits=(16, 4))
property_use_time = fields.Selection([('a', '70年'), ('b', '40年'), ('c', '50年'), ('e', '30年'), ('f', '60年')], string="产权年限")
- life_timer = fields.Datetime(string="使用时间")
+ life_timer = fields.Date(string="使用时间")
registered_id = fields.Many2one('yuthon.purpose.evidence', string='证载用途')
documents_ids = fields.Many2many('ir.attachment', string="附件")
diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py
index 853a260ba..fb2536e21 100644
--- a/yuthon_property_approval/models/property_lease_contract.py
+++ b/yuthon_property_approval/models/property_lease_contract.py
@@ -46,6 +46,7 @@ class PropertyLeaseContract(models.Model):
contract_date = fields.Date(string="合同签订日期")
property_documents_ids = fields.Many2many('ir.attachment', string="租赁合同文件")
title_address = fields.Char(string="产权地址")
+ handling_opinions = fields.Text(string="经办意见")
company_id = fields.Many2one('yuthon.property.company', string="出租方")
rent_company = fields.Char(related='company_id.name', string="收租公司名称")
rent_account = fields.Char(related='company_id.rent_account', string="收租公司账号")
diff --git a/yuthon_property_approval/views/property_lease_contract.xml b/yuthon_property_approval/views/property_lease_contract.xml
index ba5d5a26a..ea7dd3709 100644
--- a/yuthon_property_approval/views/property_lease_contract.xml
+++ b/yuthon_property_approval/views/property_lease_contract.xml
@@ -73,6 +73,7 @@
+
@@ -163,7 +164,7 @@
-
+
diff --git a/yuthon_salary/wizard/salary_compute_wizard.py b/yuthon_salary/wizard/salary_compute_wizard.py
index 437dccc6f..94b780de9 100644
--- a/yuthon_salary/wizard/salary_compute_wizard.py
+++ b/yuthon_salary/wizard/salary_compute_wizard.py
@@ -44,12 +44,12 @@ class SalaryComputeWizard(models.Model):
('current_year', '=', self.select_year),
('current_month', '=', self.select_time),
])
- # if not attendance_records:
- # raise ValidationError(
- # f"在 {self.select_year} 年 {self.select_time} 月没有出勤月度汇总记录,请先完成考勤统计。")
- # if not all(record.is_state for record in attendance_records):
- # raise ValidationError(
- # f"在 {self.select_year} 年 {self.select_time} 月的出勤月度汇总记录未全部确认,请先确认考勤。")
+ if not attendance_records:
+ raise ValidationError(
+ f"在 {self.select_year} 年 {self.select_time} 月没有出勤月度汇总记录,请先完成考勤统计。")
+ if not all(record.is_state for record in attendance_records):
+ raise ValidationError(
+ f"在 {self.select_year} 年 {self.select_time} 月的出勤月度汇总记录未全部确认,请先确认考勤。")
for employee in self.employee_ids:
contract_id = self.env['hr.contract'].search([('employee_id', '=', employee.id)], limit=1)
year = int(self.select_year)
@@ -74,13 +74,13 @@ class SalaryComputeWizard(models.Model):
'state': 'draft',
'payslip_count': 0
})
- # existing_payslip = self.env['hr.payslip'].search([
- # ('employee_id', '=', employee.id),
- # ('date_from', '<=', end_date),
- # ('date_to', '>=', start_date)
- # ])
- # if existing_payslip:
- # raise UserError( f"员工 {employee.name} 在 {start_date} 到 {end_date} 日期范围内已有工资单记录,无法创建新的工资单。")
+ existing_payslip = self.env['hr.payslip'].search([
+ ('employee_id', '=', employee.id),
+ ('date_from', '<=', end_date),
+ ('date_to', '>=', start_date)
+ ])
+ if existing_payslip:
+ raise UserError( f"员工 {employee.name} 在 {start_date} 到 {end_date} 日期范围内已有工资单记录,无法创建新的工资单。")
payslip = self.env['hr.payslip'].create({
'name': employee.name,
'employee_id': employee.id,