Possibly a bad regulator, too many volts running through it and it's burning up.
I wouldn't run it until you get it sorted out, you could end up doing more wiring damage. JMHO.
Give the Primary oil a SNIF Test... BURNT smell and Color BLACK means Stator is probably toasted too...
I Never replace on or the other...... I usually go for BOTH replaced at the same time.
You can just replace the Bad unit tho... I found that the OTHER half of the Equation not replaced went BAD very soon for me...
ALSO: check to see IF an abundance of Oil leaked by the Catcher when changing the oil Filter out Causing the SMOKE like mentioned above...(good Call SledDog)
I have had the rubber electrical boot - right under the oil filter (early Dyna) Fill with oil before from careless oil filter change... and drip out onto the Regulator AND Mark my spot for parking...