From b898dbc8077401fa83af9e7635dc3cd76fcc5815 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Fri, 6 Jun 2025 17:26:38 +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 --- yuthon_property_approval/models/property_management.py | 7 +++++++ yuthon_salary/views/inherit_hr_payslip_views.xml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/yuthon_property_approval/models/property_management.py b/yuthon_property_approval/models/property_management.py index 5563fefbf..b07fb9176 100644 --- a/yuthon_property_approval/models/property_management.py +++ b/yuthon_property_approval/models/property_management.py @@ -115,6 +115,13 @@ class PropertyManagement(models.Model): prev_info.end_date = record.start_time - timedelta(days=1) # 创建新记录 self.env['manage.information.line'].create(info_line_vals) + contract = self.env['property.lease.contract.line'].search( + [('address_id', '=', line.property_id.id)], + limit=1 + ) + if contract: + lease_id = contract.lease_id + lease_id.write({'admin_id': record.admin_id_all.id}) record.write({'is_line': True}) def put_property_management(self): diff --git a/yuthon_salary/views/inherit_hr_payslip_views.xml b/yuthon_salary/views/inherit_hr_payslip_views.xml index 2385b88da..8fda75ccb 100644 --- a/yuthon_salary/views/inherit_hr_payslip_views.xml +++ b/yuthon_salary/views/inherit_hr_payslip_views.xml @@ -47,7 +47,7 @@ - +