Rabbi Yehuda explains in the Gemara that while one recites the opening blessing of the Torah, one should close the scroll since it would appear as though one is reading the blessing from the Torah text. The Rambam explains that this is not a cause of concern, and the Shulhan Aruch (Orah Haim 139:4), following the Rambam, does not say that the scroll should be closed for the opening blessing, but only for the closing blessing. The Ran (Megila 32b) takes issue with making a difference between the first and last blessings. but the Bet Yosef explains that with the first blessing, closing the scroll is onerous on the congregation, whereas with last blessing it is more respectful to close the scroll between the different Olim. The Rama (ibid.) says that, although one does not close the Torah during the opening blessing, one should turn one’s head to the side so as not to appear to be reading the blessing from the Torah text. The Mishna Berura (O.H. 139:19) writes that turning away one’s head may appear like one is reciting a blessing on something other than the Torah, and therefore it is preferable to simply close one’s eyes.
There are several customs regarding this practice. The Arizal says that the scroll should be closed for both blessings, and this is the practice of certain communities. When asked about the Moroccan custom, Rabbi Shalom Messas explained Torah scroll is not closed when reciting the opening blessing. Furthermore, he says that closing one’s eyes for the blessings is proper and this would be acceptable according to all opinions.
Summary: The Torah scroll is not closed for the opening blessing (“Asher Bahar Banu”), but one should preferably close one’s eyes while reciting the blessing. The Torah scroll should be closed for the closing blessing (“Asher Natan Lanu”).