Repository
OCA/l10n-ecuador · module folder · Try on Runboat
Module version
1.1.4
Category
Account
Folder size
0.76 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/l10n-ecuador
Last tracking update
2026-08-07 08:23:14
Authors
Odoo Community Association (OCA), Renan Nazate, Carlos Lopez, Yazber Romero, Luis Romero, Jorge Quiguango
Maintainers
Odoo Community Association (OCA), Renan Nazate, Carlos Lopez, Yazber Romero, Luis Romero, Jorge Quiguango
Committers
Pedro M. Baeza, GitHub, Carlos Lopez, Weblate, OCA-git-bot, oca-ci, Jorge Luis, Denny Morán, joguenco
Odoo dependencies
Python dependencies
cryptography==36.0.0, xades==0.2.4, xmlsig==0.1.9, zeep
System dependencies
None
Required by
l10n_ec_credit_note, l10n_ec_withhold
Description
The `l10n_ec_account_edi` module is a crucial component in the Odoo ecosystem, specifically tailored for businesses operating in Ecuador. This module facilitates Electronic Invoicing compliance with the requirements set forth by the Ecuadorian tax authorities. It streamlines the generation and management of electronic invoices, ensuring adherence to legal standards and promoting efficiency in billing processes.

## Features

1. **Electronic Invoice Generation:** The module enables the automatic generation of electronic invoices in compliance with the Ecuadorian tax regulations. This includes the incorporation of required data fields and formats mandated by the tax authorities.

2. **Digital Signature Integration:** `l10n_ec_account_edi` integrates digital signature capabilities into the electronic invoicing process. This ensures the authenticity and integrity of the generated electronic invoices, meeting the legal requirements for electronic documents.

3. **Automated Submission:** The module streamlines the submission process of electronic invoices to the tax authorities' systems. It automates the communication and transmission of invoice data, reducing manual intervention and minimizing errors.

4. **Real-time Validation:** Before submission, the module performs real-time validation checks to ensure that the generated electronic invoices comply with the current legal standards. This helps in identifying and rectifying issues proactively.

Code Analysis

Views touched (28)
XML IDNameModelTypeStatus
account_edi_document_view_form account.edi.document.view.form account.edi.document form New
account_edi_document_view_tree account.edi.document.view.tree account.edi.document tree New
account_invoice_liquidation_purchase_form_view account.invoice.liquidation.form account.move form Inherits account.view_move_form
account_move_edi_form l10n_ec_edi.account.move.form account.move form Inherits account_edi.view_move_form_inherit
account_move_reversal_form_view account.move.reversal.form account.move.reversal form Inherits account.view_account_move_reversal
e_credit_note_document_body e_credit_note_document_body ir.ui.view qweb New
e_debit_note_document_body e_debit_note_document_body ir.ui.view qweb New
e_invoice_document_body e_invoice_document_body ir.ui.view qweb New
e_liquidation_document_body e_liquidation_document_body ir.ui.view qweb New
ec_edi_credit_note ec_edi_credit_note ir.ui.view qweb New
ec_edi_debit_note ec_edi_debit_note ir.ui.view qweb New
ec_edi_info_adicional ec_edi_info_adicional ir.ui.view qweb New
ec_edi_info_tributaria ec_edi_info_tributaria ir.ui.view qweb New
ec_edi_invoice ec_edi_invoice ir.ui.view qweb New
ec_edi_liquidation ec_edi_liquidation ir.ui.view qweb New
electronic_report_common_head electronic_report_common_head ir.ui.view qweb New
electronic_report_common_info_aditional electronic_report_common_info_aditional ir.ui.view qweb New
electronic_report_common_payment_info electronic_report_common_payment_info ir.ui.view qweb New
electronic_report_common_total_info electronic_report_common_total_info ir.ui.view qweb New
electronic_report_page_footer electronic_report_page_footer ir.ui.view qweb New
report_invoice report_invoice ir.ui.view qweb Inherits account.report_invoice
report_invoice_document report_invoice_document ir.ui.view qweb New
res_config_settings_l10n_ec_edi res.config.settings.l10n.ec.edi res.config.settings form Inherits account.res_config_settings_view_form
sri_key_type_form_view sri.key.type.form sri.key.type form New
sri_key_type_search_view sri.key.type.search sri.key.type search New
sri_key_type_tree_view sri.key.type.tree sri.key.type tree New
view_move_form account.move.form account.move form Inherits account.view_move_form
view_move_form_additional_information_extend account.move.form account.move form Inherits account.view_move_form
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (10)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (6)
  • l10n_ec_authorization_date Datetime
    index=True readonly=True args: 'Authorization Date'
  • l10n_ec_document_date Date
    compute='_compute_l10n_ec_document_data' store=True string='Document Emission Date'
  • l10n_ec_document_number Char
    compute='_compute_l10n_ec_document_data' store=True string='Document Number'
  • l10n_ec_last_sent_date Datetime
    index=True readonly=True args: 'Last Sent Date'
  • l10n_ec_partner_id Many2one → res.partner
    comodel_name='res.partner' compute='_compute_l10n_ec_document_data' store=True string='Customer'
  • l10n_ec_xml_access_key Char
    index=True readonly=True size=49 args: 'Access Key(EC)'
Public methods (6)
  • l10n_ec_generate_access_key(self, document_code_sri, complete_document_number, environment, date_document=None, company=None)
    @api.model
    Generate access key according SRI technical data sheet(table 1) :param document_code_sri: code according SRI technical data sheet(table 1) :param complete_document_number: str with document number format(0010010123456789) :param: environment: 1=test; 2=production. see _l10n_ec_get_environment
  • l10n_ec_get_check_digit(self, access_key)
    @api.model
    Compute verificator digit for access_key according SRI technical data sheet (table 1)
  • l10n_ec_get_current_document(self)
  • l10n_ec_header_get_total_with_taxes(self, taxes_data)
  • l10n_ec_send_mail_to_partner(self)
    @api.model
  • l10n_ec_send_mail_to_partners(self)
    @api.model

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (13)
  • l10n_ec_additional_information_move_ids One2many → l10n.ec.additional.information
    string='Additional Information' args: 'l10n.ec.additional.information', 'move_id'
  • l10n_ec_authorization_date Datetime
    compute='_compute_l10n_ec_edi_document_data' store=True string='Electronic Authorization Date'
  • l10n_ec_credit_days Integer
    compute='_compute_l10n_ec_credit_days' store=True string='Credit days'
  • l10n_ec_electronic_authorization Char
    copy=False index=True size=49 string='Electronic Authorization'
  • l10n_ec_is_edi_doc Boolean
    copy=False default=False string='Is Ecuadorian Electronic Document'
  • l10n_ec_journal_type Selection
    related='journal_id.type' store=True string='Journal Type'
  • l10n_ec_legacy_document_authorization Char
    size=49 string='External Authorization Number'
  • l10n_ec_legacy_document_date Date
    string='External Document Date'
  • l10n_ec_legacy_document_number Char
    string='External Document Number'
  • l10n_ec_reason Char
    size=300 string='Refund Reason'
  • l10n_ec_sri_payment_id Many2one
    default=<expr>
  • l10n_ec_xml_access_key Char
    compute='_compute_l10n_ec_edi_document_data' store=True string='Access Key(EC)'
  • l10n_latam_internal_type Selection
    related='l10n_latam_document_type_id.internal_type' store=True string='L10n Latam Internal Type'
Public methods (5)
  • action_post(self)
  • action_send_and_print(self)
  • button_cancel_posted_moves(self)
    Restrict the cancel process when receipt is authorized or connection to the SRI is not possible
  • l10n_ec_get_identification_type(self)
  • l10n_ec_send_email(self)

New fields (0)

No new fields.

Public methods (3)
  • l10n_ec_get_credit_note_edi_data(self, taxes_data)
  • l10n_ec_get_debit_note_edi_data(self, taxes_data)
  • l10n_ec_get_invoice_edi_data(self, taxes_data)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (3)
  • description Char
    required=True
  • move_id Many2one → account.move
    ondelete='cascade' args: 'account.move', 'Account Move'
  • name Char
    required=True
Public methods (0)

No public methods.

New fields (6)
  • l10n_ec_credit_note_version Selection
    default='1.1.0' string='Credit Note Version xml' args: [('1.1.0', '1.1.0')]
  • l10n_ec_debit_note_version Selection
    default='1.0.0' string='Debit Note Version xml' args: [('1.0.0', '1.0.0')]
  • l10n_ec_invoice_version Selection
    default='1.1.0' string='Invoice Version xml' args: [('1.0.0', '1.0.0'), ('1.1.0', '1.1.0'), ('2.0.0', '2.0.0(Third Party Items)'), ('2.1.0', '2.1.0(Third Party Items)')]
  • l10n_ec_key_type_id Many2one → sri.key.type
    comodel_name='sri.key.type' ondelete='restrict' string='Certificate File'
  • l10n_ec_liquidation_version Selection
    default='1.1.0' string='Purchase Liquidation Version xml' args: [('1.0.0', '1.0.0'), ('1.1.0', '1.1.0')]
  • l10n_ec_type_environment Selection
    default='test' string='Environment type for electronic documents' args: [('test', 'Test'), ('production', 'Production')]
Public methods (3)
  • l10n_ec_action_unauthorized_documents_notification(self)
    @api.model
  • l10n_ec_get_edi_document_unauthorized(self)
  • l10n_ec_get_resolution_data(self, date=None)
    @api.model

New fields (7)
  • l10n_ec_credit_note_version Selection
    readonly=False related='company_id.l10n_ec_credit_note_version'
  • l10n_ec_debit_note_version Selection
    readonly=False related='company_id.l10n_ec_debit_note_version'
  • l10n_ec_final_consumer_limit Float
    config_parameter='l10n_ec_final_consumer_limit' default=50.0 readonly=False string='Invoice Sales Limit Final Consumer'
  • l10n_ec_invoice_version Selection
    readonly=False related='company_id.l10n_ec_invoice_version'
  • l10n_ec_key_type_id Many2one → sri.key.type
    comodel_name='sri.key.type' readonly=False related='company_id.l10n_ec_key_type_id'
  • l10n_ec_liquidation_version Selection
    readonly=False related='company_id.l10n_ec_liquidation_version'
  • l10n_ec_type_environment Selection
    readonly=False related='company_id.l10n_ec_type_environment'
Public methods (0)

No public methods.

New fields (15)
  • active Boolean
    default=True string='Active?'
  • cert_serial_number Char
    readonly=True string='Serial number (certificate)'
  • cert_version Char
    readonly=True string='Version'
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> string='Company'
  • days_for_notification Integer
    default=30 string='Days for notification'
  • expire_date Date
    readonly=True string='Expiration date'
  • file_content Binary
    string='Signature File'
  • file_name Char
    readonly=True string='Filename'
  • issue_date Date
    readonly=True string='Date of issue'
  • issuer_common_name Char
    readonly=True string='Organization (Issuer)'
  • name Char
    readonly=False required=True size=255
  • password Char
    string='Signing key'
  • state Selection
    default='unverified' readonly=True args: [('unverified', 'Unverified'), ('valid', 'Valid Signature'), ('expired', 'Signature Expired')]
  • subject_common_name Char
    readonly=True string='Organization(Subject)'
  • subject_serial_number Char
    readonly=True string='Serial Number(Subject)'
Public methods (4)
  • action_email_notification(self)
    @api.model
  • action_sign(self, xml_string_data)
  • action_validate_and_load(self)
  • days_to_expire(self)

Loading…