Self-dual models with theta terms