MN 71 says the buddha is not omniscient while walking, standing, sleeping, and waking.
Sir, I have heard this: ‘The ascetic Gotama claims to be all-knowing and all-seeing, to know and see everything without exception, thus: “Knowledge and vision are constantly and continually present to me, while walking, standing, sleeping, and waking.”’ I trust that those who say this repeat what the Buddha has said, and do not misrepresent him with an untruth? Is their explanation in line with the teaching? Are there any legitimate grounds for rebuke and criticism?”
Ye te, bhante, evamāhaṃsu: ‘samaṇo gotamo sabbaññū sabbadassāvī, aparisesaṃ ñāṇadassanaṃ paṭijānāti, carato ca me tiṭṭhato ca suttassa ca jāgarassa ca satataṃ samitaṃ ñāṇadassanaṃ paccupaṭṭhitan’ti
“Vaccha, those who say this do not repeat what I have said. They misrepresent me with what is false and untrue.”
‘The ascetic Gotama has the three knowledges.’ Answering like this you would repeat what I have said, and not misrepresent me with an untruth. You would explain in line with my teaching, and there would be no legitimate grounds for rebuke and criticism.
Tevijjo samaṇo gotamoti kho, vaccha, byākaramāno vuttavādī ceva me assa, na ca maṃ abhūtena abbhācikkheyya, dhammassa cānudhammaṃ byākareyya, na ca koci sahadhammiko vādānuvādo gārayhaṃ ṭhānaṃ āgaccheyya (MN 71).
MN 90 says that the Buddha was a omniscient.
Then the king said to the Buddha,
Atha kho rājā pasenadi kosalo bhagavantaṃ etadavoca:
“I have heard, sir, that the ascetic Gotama says this:
‘There is no ascetic or brahmin who will claim to be all-knowing and all-seeing, to know and see everything without exception: that is not possible.’
Do those who say this repeat what the Buddha has said, and not misrepresent him with an untruth? Is their explanation in line with the teaching? Are there any legitimate grounds for rebuke and criticism?”*Ye te, bhante, evamāhaṃsu: ‘**samaṇo gotamo evamāha—natthi so samaṇo vā brāhmaṇo vā yo sabbaññū sabbadassāvī aparisesaṃ ñāṇadassanaṃ paṭijānissati, netaṃ ṭhānaṃ vijjatī’*ti; kacci te, bhante, bhagavato vuttavādino, na ca bhagavantaṃ abhūtena abbhācikkhanti, dhammassa cānudhammaṃ byākaronti, na ca koci sahadhammiko vādānuvādo gārayhaṃ ṭhānaṃ āgacchatī”ti?
“Great king, those who say this do not repeat what I have said. They misrepresent me with what is false and untrue.”
(MN 90 )
These two suttas has kind of controversy about the buddha being omniscient. However, omniscience explained in Buddhism is differ from other religions.
Different from Jain concept kevalañāna. Also it is different from gods omniscience explained in theology.
“Nothing in all creation is hidden from God’s sight. Everything is uncovered and laid bare before the eyes of him to whom we must give account” (Hebrews 4:13).
“Indeed, the very hairs of your head are all numbered. Don’t be afraid; you are worth more than many sparrows” (Luke 12:7).
As I see from the buddhism, the buddha is omniscient, but the omniscience is not something that can be there all the time. But he can know what he wants to know using his ñānas.
Sabbaññutañāṇa is explained in Patisambhidamagga. Unfortunately there is no English translation.
Is The Buddha an Omniscient?