From a905cb481feb3b2f774209ef7c97f45547a1efd8 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Thu, 2 Jan 2025 19:10:47 +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_lease_contract.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py index f59f0bbe7..c8972c955 100644 --- a/yuthon_property_approval/models/property_lease_contract.py +++ b/yuthon_property_approval/models/property_lease_contract.py @@ -482,7 +482,8 @@ class PropertyLeaseContract(models.Model): } def action_relevance_property(self): - for record in self: + contract_ids = self.env["property.lease.contract"].browse(self._context.get('active_ids', self._context.get('active_id'))) + for record in contract_ids: property_id = self.env['yuthon.property'].search([('name', '=', record.name)]) if property_id: management_list = []