Chile - DTE Base
l10n_cl_dte_base · OCA/l10n-chile
-
Security25/25No findings
-
Activity25/25Last human commit 1 month ago
-
Required by5/250 modules depend on it
-
Maturity5/25In 1 Odoo series since 18.0
Heuristic over the facts below, not an audit · How it's computed
Migration considerations
ElectronicArtifact— Migrating to 19.0: `_sql_constraints` is ignored and its constraints are silently not created: declare `models.Constraint` attributes instead. migration-sql-constraints · sourceElectronicDocument— Migrating to 19.0: `_sql_constraints` is ignored and its constraints are silently not created: declare `models.Constraint` attributes instead. migration-sql-constraints · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
Stores Chilean electronic tax document identities and immutable evidence with company-scoped access. Each document records the company’s SII environment at creation. DTE managers can verify evidence integrity.
Validated preparation and fiscal transitions record an immutable audit event in the same transaction as each state change.
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 0
No views found for this module.
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 4
-
byte_countIntegercopy=Falsereadonly=True -
company_idMany2oneindex=Truerelated='document_id.company_id'store=True -
contentBinaryattachment=Truecopy=Falsegroups='l10n_cl_dte_base.group_dte_manager'required=True -
document_idMany2one → l10n_cl.electronic.documentindex=Trueondelete='restrict'required=True args: 'l10n_cl.electronic.document' -
encodingChar -
is_simulatedBooleancompute='_compute_is_simulated'store=True -
mimetypeCharrequired=True -
producer_versionChar -
roleSelectionindex=Truerequired=True args: [('caf_source', 'CAF Source'), ('source_snapshot', 'Source Snapshot'), ('unsigned_xml', 'Unsigned XML'), ('signed_xml', 'Signed XML'), ('sii_request', 'SII Request'), ('sii_response', 'SII Response'), ('status_response', 'Status Response')] -
sha256Charcopy=Falseindex=Truereadonly=Truerequired=True -
supersedes_idMany2one → l10n_cl.electronic.artifactcheck_company=Truecopy=Falseondelete='restrict'readonly=Truestring='Previous Signature' args: 'l10n_cl.electronic.artifact'
-
action_verify_integrity(self)Recompute the digest and byte count from the stored content. -
copy(self, default=None) -
create(self, vals_list)@api.model_create_multiCalculate evidence metadata from the exact persisted bytes. -
unlink(self) -
write(self, vals)
-
artifact_idsOne2many → l10n_cl.electronic.artifactstring='Evidence' args: 'l10n_cl.electronic.artifact', 'document_id' -
company_idMany2one → res.companydefault=<expr>index=Truerequired=True args: 'res.company' -
document_codeCharindex=Truerequired=True -
event_idsOne2many → l10n_cl.electronic.eventargs: 'l10n_cl.electronic.event', 'document_id' -
fiscal_stateSelectioncopy=Falsedefault='unknown'index=Truerequired=True args: [('unknown', 'Unknown'), ('submitted', 'Submitted'), ('processing', 'Processing'), ('accepted', 'Accepted'), ('rejected', 'Rejected'), ('outcome_unknown', 'Outcome Unknown')] -
folioIntegercopy=Falseindex=Truereadonly=True -
nameCharcopy=Falseindex=Truerequired=True -
payload_digestCharcopy=Falseindex=Truereadonly=True -
preparation_stateSelectioncopy=Falsedefault='draft'index=Truerequired=True args: [('draft', 'Draft'), ('authorized', 'CAF Authorized'), ('numbered', 'Folio Reserved'), ('prepared', 'XML Prepared'), ('signed', 'Signed'), ('queued', 'Queued')] -
signature_revisionIntegercopy=Falsedefault=0readonly=True -
sii_environmentSelectioncopy=Falseindex=Truereadonly=Truerequired=True args: [('demo', 'Demo / Simulated'), ('certification', 'Certification'), ('production', 'Production')] -
source_keyCharcopy=Falseindex=Truerequired=True
-
action_record_source_snapshot(self, artifact_id)Bind one immutable source snapshot artifact to this document. -
action_record_transition(self, target_state, event_code, message=None, correlation_key=None, artifact_id=False, folio_number=False)Apply one valid lifecycle transition and persist its audit event. -
copy(self, default=None) -
create(self, vals_list)@api.model_create_multiCreate a new document only in its initial, unnumbered state. -
init(self)Index reserved folios while ignoring the unnumbered zero value. -
unlink(self) -
write(self, vals)Keep identity and lifecycle fields behind validated actions.
-
artifact_idMany2one → l10n_cl.electronic.artifactcheck_company=Trueindex=Trueondelete='restrict' args: 'l10n_cl.electronic.artifact' -
company_idMany2oneindex=Truerelated='document_id.company_id'store=True -
correlation_keyCharindex=True -
document_idMany2one → l10n_cl.electronic.documentindex=Trueondelete='restrict'required=True args: 'l10n_cl.electronic.document' -
event_codeCharindex=Truerequired=True -
from_stateChar -
messageText -
state_domainSelectionindex=Truerequired=True args: [('preparation', 'Preparation'), ('fiscal', 'Fiscal')] -
to_stateChar
-
create(self, vals_list)@api.model_create_multiOnly trusted server-side actions may create audit events. -
unlink(self) -
write(self, vals)
-
dte_sii_environmentSelectiondefault='demo'groups='l10n_cl_dte_base.group_dte_manager'required=Truestring='DTE SII Environment' args: [('demo', 'Demo / Simulated'), ('certification', 'Certification'), ('production', 'Production')]
No public methods.