code: def unlink(self):
          
          for room in self:
              for reserv_line in room.room_reservation_line_ids:
                  if reserv_line.status == 'confirm':
                      raise ValidationError(_('User is not able to delete the \
                                              room after the room in %s state \
                                              in reservation')
                                            % (reserv_line.status))
          return super(HotelRoom, self).unlink()
docs: Overrides orm unlink method.
          @param self: The object pointer
          @return: True/False.