Here is the code for this:
document_page (folder)
document.py
class DocumentPage(models.Model):
_name = "document.page"
...
document_attached = fields.Binary("Attached Document")
def download_document_attached(self): #Download the document_attached
download_document_attached.xml
...
...