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 = []