In my opinion-
As per charging Section 4 of the Act, tax would be levied on the income of the previous year (except otherwise provided)
Thus only that part of amount which accrues for the previous year will be regarded as income for the relevant AY.
even though rent is received for 36 months. the part of amount attributable for FY 2017-18 would can only be considered as income of assessee for relevant AY.
now the deductor has rightly deducted tax on whole part of the amount as it is mandatory for deductor to deduct tax at the time of payment (irrespective of the years for which it is paid) or credit whichever is earlier as per the provisions of Section 194-I.
Now, in deductees 26AS whole of rent of Rs. 18,00,000/- along with whole of TDS of Rs. 1,80,000/- will appear.
however, income chargeable to tax for FY 2017-18 will be the rent attributable to year under consideration. The whole of 18,00,000/- cannot be considered as income for FY 2017-18.
Further, as per RULE 37BA (3) of the Income Tax Rules, 1962, TDS credit would be allowed to be carried forward for the subsequent period to which rent pertains.