Working patch for ticket #20625 to allow defining chainable QuerySet on custom model managers.