Heavy flavour production at the Tevatron