Cal. Rev. & Tax. Code § 24346
(a) For purposes of subdivision (a) of Section 24345, if real property is sold during any real property tax year, then—
(b)
(1) In the case of any sale of real property; if—
(B) The other party to the sale is (under the law imposing the real property tax) liable for the real property tax for the real property tax year;
then for purposes of subdivision (a) of Section 24345 the corporation shall be treated as having paid, on the date of the sale, so much of the tax as, under subdivision (a), is treated as imposed on the corporation. For purposes of the preceding sentence, if neither party is liable for the tax, then the party holding the property at the time the tax becomes a lien on the property shall be considered liable for the real property tax for the real property tax year.
(4) In the case of any sale of real property, if the corporation’s net income for the taxable year during which the sale occurs is computed under an accrual method of accounting, and if no election under subdivision (b) of Section 24681 (relating to the accrual of real property taxes) applies, then, for purposes of subdivision (a) of Section 24345, that portion of the tax that—
(B) May not, by reason of the corporation’s method of accounting, be deducted by the corporation for any taxable year,
shall be treated as having accrued on the date of the sale.