Declaring Capital Gains when moving from one state to another state and selling property in the non-resident state.

How do I avoid paying Capital Gains taxes in two different states?  Both States seem to want me to claim the full amount of Capital Gains for Real Estate I sold after moving from California to Oregon.  The Real Estate I sold was for my primary home and not an investment.  In TT CA State I didn't see where I could put a credit for being taxed $800 in the TT Oregon State.  For Oregon I think there's a place where I can put a a dollar amount for being taxed in another state but I don't know if I should put the entire amount of the Capital Gains or if I should leave this section blank and if TurboTax will figure this out for me using a ratio based on the days I lived in each state?  In addition, I believe that TurboTax and California have reciprocity so does TurboTax also take this into consideration?

 

In addition it is confusing why I need to list my Capital Gains separately for both States because that amount is already included in my total Federal income?  I have the opportunity to allocate a different amount of Capital Gains for each State but should I do this or will TurboTax figure this out for me?  Should I put the full amount of my Capital Gains in both States?  I was able to allocate a different amount of Interest and Dividends to each state but I wasn't sure if I was supposed to allocate a different amount of the Capital Gains to each state?  This is all very confusing.

 

Another question I have is on form CA (540NR); when I printed out the form that TurboTax generated column "B" was left blank which refers to "Subtractions" and says see instructions for differences between CA and federal law.  Where can I find these instructions and why didn't TurboTax give me an option of filling out column "B"?  It also left column "E" blank on the same form which I don't think is correct.  Whether column "E" is filled in with a dollar amount seems to be determined by whether I check the box "sale by sale" or "allocate if you know the amounts".  This page is very unclear and needs better explanation for the boxes that would be checked.  I have no idea what "sale by sale" means or if I know what the "allocation amounts" should be.  My taxes changed depending on which box I checked and it also determined if column "E" was filled in or not for California.  TurboTax needs to explain the laws for each state better and provide references.

 

I hope that someone can help me with my questions.  Thank you.