Poland 's parliament has overwhelmingly passed a bill approving ratification of the new European Union treaty after weeks of political infighting .