Several mourning practices are observed during the week of Tisha B’Ab, from Mosa’eh Shabbat before Tisha B’Ab until after the fast. These include haircutting and shaving. The Halachic authorities addressed the question of how these Halachot apply in years such as this year, when Tisha B’Ab falls on Shabbat and is thus observed on Sunday (as fasting is inappropriate on Shabbat), or, for that matter, if Tisha B’Ab actually falls on Sunday. In these situations, Tisha B’Ab begins immediately after Shabbat, and thus there is no "Shabu’a Sh’hal Bo Tisha B’Ab" (week of Tisha B’Ab). Do the restrictions of the week of Tisha B’Ab apply in such a case, and, if so, when?
Hacham Ovadia Yosef ZT"L ruled that strictly speaking, the Halachot of "Shabu’a Sh’hal Bo Tisha B’Ab" do not apply in such a case. Since Tisha B’Ab begins immediately after Shabbat, there is no "week of Tisha B’Ab," and one may shave and take a haircut throughout the previous week. However, in Halichot Olam (vol. 2), Hacham Ovadia notes the ruling of the Ben Ish Hai (Rav Yosef Haim of Baghdad, 1833-1909), in Parashat Debarim (12), that in such a case one should preferably abstain from shaving and haircutting the Friday before Tisha B’Ab, so he does not appear perfectly groomed on Tisha B’Ab. This is also the position of Rav Haim Palachi (Turkey, 1788-1869), in his work Mo’ed Le’chol Hai. Hacham Ovadia notes that this is the position of the Kolbo, as well.
Elsewhere in his writings, Hacham Ovadia noted the custom observed by some to refrain from haircutting and shaving throughout the entire week before Tisha B’Ab when it falls on Sunday. Rabbi Biton, in Yalkut Yosef, writes that this is the preferred practice.
As for the final Halacha, then, it is permissible to shave and take a haircut during the week before Tisha B’Ab when the fast is observed on Sunday, though one who wishes to be stringent should refrain from shaving and haircutting the Friday before Tisha B’Ab, and those who wish to be extra stringent should refrain throughout the previous week.
Summary: Strictly speaking, when Tisha B’Ab is observed on Sunday, one is allowed to shave and take a haircut the week before Tisha B’Ab, without any restrictions. However, many have the custom to refrain from shaving and haircutting in such a case on the Friday before Tisha B’Ab, and there are those who refrain throughout the entire week before Tisha B’Ab.