Changing affiliation on publication
I would argue that it's a question of resources—if you have used resources (equipment, personnel, computers, financial) of both institutions in executing the paper before its initial submission, then you should list both institutes as supporting the work.

On the other hand, if the core of the work—both research and writing—were done at the old institution, then the new institution should only be listed as a "present affiliation," rather than as a "co-sponsor" of the work.