'Generate a PDF of a Donation certificate'

@staticmethod
def inv_recv_donation_cert(r, **attr):

    T = current.T
    db = current.db
    table = db.inv_recv
    table.date.readable = True
    table.type.readable = False
    field = table.site_id
    field.readable = True
    field.label = (T('By    %(site)s') % dict(site=T(current.deployment_settings.get_inv_facility_label())))
    field.represent = current.s3db.org_site_represent
    record = table[r.id]
    site_id = record.site_id
    site = field.represent(site_id, False)
    from s3.s3export import S3Exporter
    exporter = S3Exporter().pdf
    return exporter(r.resource, request=r, method='list', pdf_title='Donation    Certificate', pdf_filename=('DC-%s' % site), pdf_hide_comments=True, pdf_componentname='track_item', **attr)
