The codeshare issue is a red herring - you flew on a KLM flight LHR-AMS, connecting to CZ AMS-CAN on one ticket.
Check-in was with KLM since they are operating the first flight, and they had incompetent staff at check-in.
Incompetent staff are to be found at every airport and every airline in the world.
When the first agent required a visa, you should have asked for a supervisor or station manager who should be
more competent. They should all have access to TIMATIC, and should not need anything other than guidance
on which section to look at.