Having done it in the past on BA, I know that it works for BA. As you say it's the partner earning where it's less clear what happens.
Having looked through the Alaska forums, it looks like Alaska does credit on it's own flights if you don't take the final flight. However, still haven't found anything about doing this on a partner flight.