function transaction_title( $title )
{
if ( 'transaction' == get_current_screen()->post_type && '' == $title )
{
return 'Transaction '.uniqid();
}
// else return the normal title
else
{
return $title;
}
}
add_filter( 'title_save_pre', 'transaction_title' );