Edit: In light of martell's comment, this will be my previous company to me(individual) relationship. From the contract's perspective, it will be from India to Canada. I was present in both countries in the same year. I am an Indian citizen and a Canadian Permanent Resident
There are things to consider after knowing that such as the type of work, if there is a double taxation agreement between the countries, if it is to you individually were you resident in one or both countries during the year and which one.
Some countries also always expect you to pay tax regardless of presence - for example the US if you are a citizen or permanent resident which is a somewhat more complicated situation
For context I've dealt with some international situations between Ireland and the US in the past - but don't take anything I say as legal advice because IANAL or tax expert