Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: AEAT Base

Entity: l10n.es.aeat.certificate

Compute Method: _compute_public_key

Inputs Method Outputs
for record in self:
            if not record.public_key:
                record.public_key_file = False
                record.public_key_filename = False
                continue
            with open(record.public_key, "rb") as f:
                certificate = load_pem_x509_certificate(f.read())
            public_key = certificate.public_bytes(Encoding.PEM)
            record.public_key_filename = f"{record.name}.pem"
            record.public_key_file = public_key

Back to entity