(self)
Compute if the invoice is enabled for the SII
Compute if the invoice is enabled for the SII
Compute if the invoice is enabled for the SII
def _compute_sii_enabled(self):
        """Compute if the invoice is enabled for the SII"""
        for invoice in self:
            if invoice.company_id.sii_enabled and invoice.is_invoice():
                invoice.sii_enabled = (
                    invoice.fiscal_position_id and invoice.fiscal_position_id.sii_active
                ) or not invoice.fiscal_position_id
            else:
                invoice.sii_enabled = False
def _compute_sii_enabled ( self ) : for invoice in self : if invoice . company_id . sii_enabled and invoice . is_invoice ( ) : invoice . sii_enabled = ( invoice . fiscal_position_id and invoice . fiscal_position_id . sii_active ) or not invoice . fiscal_position_id else : invoice . sii_enabled = False