diff --git a/odex25_realstate/property_management/models/rental_contract.py b/odex25_realstate/property_management/models/rental_contract.py index c7a47346b..bad15c483 100644 --- a/odex25_realstate/property_management/models/rental_contract.py +++ b/odex25_realstate/property_management/models/rental_contract.py @@ -363,7 +363,7 @@ class RentalContract(models.Model): def action_review(self): full = True - if self.property_id.state in ['reserve', 'rent']: + if self.property_id.state in ['reserve', 'rent'] and self.property_id.contract_counts>1: raise exceptions.ValidationError(_("Property is already reserved or rented")) # for units in self.property_id.unit_ids: