Retirement tax questions

Hello, We owned and sold a rental property in CA while we are full time ID residents. Because the property, we have to file the CA state tax return.

Now, while in CA state tax return, Turbo Tax is asking about the income allocation to CA. Since my husband is working in ID as self-employed and the client is in CA, so I think all the income sources are from CA. How about the self-401k contribution? should I allocate all to CA, since it is the income from CA to contribute or should I allocate to ID since we live in ID full time? 

Thank you so much!