From 97243974399e4ee3dec9fcda5ffcce5a33fa6254 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, 1 Nov 2025 16:22:16 +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 --- .../views/hr_attendance_detail_wechat_views.xml | 8 ++++---- .../models/inherit_yuthon_property.py | 9 +-------- .../views/property_lease_contract.xml | 16 ++++++++-------- 3 files changed, 13 insertions(+), 20 deletions(-) diff --git a/yuthon_hr_attendance/views/hr_attendance_detail_wechat_views.xml b/yuthon_hr_attendance/views/hr_attendance_detail_wechat_views.xml index 8c0e0a9f7..41d471f30 100644 --- a/yuthon_hr_attendance/views/hr_attendance_detail_wechat_views.xml +++ b/yuthon_hr_attendance/views/hr_attendance_detail_wechat_views.xml @@ -35,11 +35,11 @@ - - - - + + + + diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py index cf41c31f5..c2582055c 100644 --- a/yuthon_property_approval/models/inherit_yuthon_property.py +++ b/yuthon_property_approval/models/inherit_yuthon_property.py @@ -68,14 +68,7 @@ class MeterArchivesLine(models.Model): archives_ids = self.env["meter.archives.line"].browse( self._context.get('active_ids', self._context.get('active_id'))) for record in archives_ids: - if record.yuthon_property_ids: - contract_line = self.env['property.lease.contract.line'].search([ - ('address_id', '=', record.yuthon_property_ids[0].id), - ('lease_id.actual_start_time', '<=', record.meter_date), - ('lease_id.actual_end_time', '>=', record.meter_date) - ], limit=1) - if contract_line: - record.contract_id = contract_line.lease_id.id + record.lessee_id = record.contract_id.lessee_id.id class MeterWaterLine(models.Model): diff --git a/yuthon_property_approval/views/property_lease_contract.xml b/yuthon_property_approval/views/property_lease_contract.xml index 3154ff301..26f598a0c 100644 --- a/yuthon_property_approval/views/property_lease_contract.xml +++ b/yuthon_property_approval/views/property_lease_contract.xml @@ -367,8 +367,14 @@