mieć olej w głowie

Etymology
lit. 'to have oil in one's head'.

Verb

 * 1)  to have all one's marbles