From 4213c80b74ac783e659cec10c6f1ab05dec23774 Mon Sep 17 00:00:00 2001
From: zhou <123@>
Date: Tue, 12 Aug 2025 11:59:57 +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/overtime_approval.py | 2 +-
.../views/overtime_approval.xml | 2 +-
.../models/inherit_yuthon_property.py | 27 ++++++++++---------
3 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/yuthon_hr_attendance/models/overtime_approval.py b/yuthon_hr_attendance/models/overtime_approval.py
index fcb0e20b7..ae6ebfe64 100644
--- a/yuthon_hr_attendance/models/overtime_approval.py
+++ b/yuthon_hr_attendance/models/overtime_approval.py
@@ -235,7 +235,7 @@ class OvertimeApprovals(models.Model):
raise UserError("开始时间不能晚于结束时间")
start_date = fields.Datetime.from_string(record.start_time)
end_date = fields.Datetime.from_string(record.end_time)
- public_holidays = self.env['resource.calendar.leaves'].search([])
+ public_holidays = self.env['resource.calendar.leaves'].search([("calendar_id", "=", "行政考勤工作日")])
for holiday in public_holidays:
holiday_start = fields.Datetime.from_string(holiday.date_from)
holiday_end = fields.Datetime.from_string(holiday.date_to)
diff --git a/yuthon_hr_attendance/views/overtime_approval.xml b/yuthon_hr_attendance/views/overtime_approval.xml
index f51ed381f..ef46fa500 100644
--- a/yuthon_hr_attendance/views/overtime_approval.xml
+++ b/yuthon_hr_attendance/views/overtime_approval.xml
@@ -62,6 +62,7 @@
+
@@ -76,7 +77,6 @@
-
diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py
index 8f08f3402..9872a9ec7 100644
--- a/yuthon_property_approval/models/inherit_yuthon_property.py
+++ b/yuthon_property_approval/models/inherit_yuthon_property.py
@@ -623,19 +623,20 @@ class PropertyRentList(models.Model):
else:
due_date_end = fields.Date.to_string(theoretical_end)
- # 创建应收记录
- self.env['property.accounts.receivable'].create({
- 'contract_id': contract.id if contract else None,
- 'property_id': rec.property_id.id,
- 'lessee_id': contract.lessee_id.id if contract and contract.lessee_id else None,
- 'original_amount': rec.original_amount,
- 'due_date': due_date,
- 'due_date_end': due_date_end,
- 'create_time': datetime.now(),
- 'management_type_id': management_type.id,
- })
- rec.is_push = True
- self.reconcile_with_bank_statements(rec)
+ # 创建应收记录
+ self.env['property.accounts.receivable'].create({
+ 'contract_id': contract.id if contract else None,
+ 'property_id': rec.property_id.id,
+ 'lessee_id': contract.lessee_id.id if contract and contract.lessee_id else None,
+ 'original_amount': rec.original_amount,
+ 'due_date': due_date,
+ 'due_date_end': due_date_end,
+ 'create_time': datetime.now(),
+ 'management_type_id': management_type.id,
+ })
+
+ rec.is_push = True
+ self.reconcile_with_bank_statements(rec)
def reconcile_with_bank_statements(self, rec):
bank_accounts = self.env['property.bank.line'].search([