California gets to tax the gain if the property was located in Calif, such as real estate. Oregon gets to tax it also because you live there.
TT/Calif will prepare the other state tax credit for you for the portion of Oregon tax attributable to the gain that Calif is taxing also. Prepare your Oregon return first, then the nonresident Calif return.