def METHOD_NAME(self, attachment_id):
    if attachment_id:
        return {
            "type": "ir.actions.act_url",
            "url": "/web/content/{id}/{nome}".format(
                id=attachment_id.id, nome=attachment_id.name
            ),
            "target": "new",
        }