diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py index 0776aea67..c640e4481 100644 --- a/yuthon_property_approval/models/property_lease_contract.py +++ b/yuthon_property_approval/models/property_lease_contract.py @@ -1453,7 +1453,7 @@ class PropertyLeaseContract(models.Model): for record in lease_contract_ids: if len(lease_contract_ids) > 1: raise UserError("续租审批只能提交一个物业合同") - address_id = record.lease_ids[0].address_id if record.lease_ids else '' + address_id = record.lease_ids[-1].address_id if record.lease_ids else '' return { 'name': '退租申请', "type": "ir.actions.act_window", @@ -1464,7 +1464,6 @@ class PropertyLeaseContract(models.Model): 'default_address_id': address_id.id, 'default_end_data': record.term_end_time, 'default_start_data': record.term_start_time, - 'default_contract_id': record.id, }, } diff --git a/yuthon_property_approval/views/property_early_quitting.xml b/yuthon_property_approval/views/property_early_quitting.xml index 041a98cb9..8bf674545 100644 --- a/yuthon_property_approval/views/property_early_quitting.xml +++ b/yuthon_property_approval/views/property_early_quitting.xml @@ -49,7 +49,7 @@ - +