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

Module: Spain - SII EDI Suministro de Libros

Entity: res.company

Compute Method: _compute_l10n_es_sii_certificate

Inputs Method Outputs
  • country_code
  • id
for company in self:
            if company.country_code == 'ES':
                company.l10n_es_sii_certificate_id = self.env['certificate.certificate'].search(
                    [('company_id', '=', company.id), ('is_valid', '=', True), ('scope', '=', 'sii')],
                    order='date_end desc',
                    limit=1,
                )
            else:
                company.l10n_es_sii_certificate_id = False

Back to entity