You will receive this error if a staff member has a post of Head Teacher but not the role of Head Teacher recorded on their contract.
To resolve this you will need to amend these fields on the contract in question. To do this locate the staff member in Admin > Personnel > Staff. Then click the cog next to the contract you wish to update. In this screen the post and role identifier fields are on the left:
Make sure to click update to save any changes made.