A character that is Immune to Psychology and joins a unit that is not Immune to Psychology loses his Immunity as long as he is with them. If the character leaves the unit by declaring a charge, he automatically regains his Immunity (including during that charge).
A character that is not Immune to Psychology and joins a unit that is, becomes Immune to Psychology for as long as he stays with the unit.