Portugal - Accounting (Certification)
l10n_pt_certification · OCA/l10n-portugal
-
Security25/25No findings
-
Activity20/25Last human commit 8 months 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
L10nPtATSeries— Migrating to 19.0: `_sql_constraints` is ignored and its constraints are silently not created: declare `models.Constraint` attributes instead. (2 occurrences in this file) migration-sql-constraints · sourceL10nPtAttachment— 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
This bridge module adds the technical requirements of the Portuguese Certification regulation (Administrative Decree no. 363/2010) that stipulates certain criteria concerning the inalterability and authenticity of invoicing data.
The module adds the following features:
- AT Series: allows the creation of document series, under which documents must be emitted.
- Digital signature: documents are signed after they are emitted. After being signed, key data cannot be modified.
- QR Code: a QR Code is added to signed documents
- Hash integrity report is available based on the digital signature
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 35
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
l10n_pt_external_layout_bold |
l10n_pt_external_layout_bold | ir.ui.view | qweb | Inherits web.external_layout_bold |
l10n_pt_external_layout_boxed |
l10n_pt_external_layout_boxed | ir.ui.view | qweb | Inherits web.external_layout_boxed |
l10n_pt_external_layout_bubble |
l10n_pt_external_layout_bubble | ir.ui.view | qweb | Inherits web.external_layout_bubble |
l10n_pt_external_layout_folder |
l10n_pt_external_layout_folder | ir.ui.view | qweb | Inherits web.external_layout_folder |
l10n_pt_external_layout_standard |
l10n_pt_external_layout_standard | ir.ui.view | qweb | Inherits web.external_layout_standard |
l10n_pt_external_layout_striped |
l10n_pt_external_layout_striped | ir.ui.view | qweb | Inherits web.external_layout_striped |
l10n_pt_external_layout_wave |
l10n_pt_external_layout_wave | ir.ui.view | qweb | Inherits web.external_layout_wave |
l10n_pt_partner_vat |
l10n_pt_partner_vat | ir.ui.view | qweb | New |
l10n_pt_report_payment_receipt_document_inherit |
l10n_pt_report_payment_receipt_document_inherit | ir.ui.view | qweb | Inherits account.report_payment_receipt_document |
l10n_pt_report_template_address_training_mode |
l10n_pt_report_template_address_training_mode | ir.ui.view | qweb | New |
l10n_pt_report_template_footer |
l10n_pt_report_template_footer | ir.ui.view | qweb | New |
l10n_pt_report_template_footer_document_type_and_number_block |
l10n_pt_report_template_footer_document_type_and_number_block | ir.ui.view | qweb | New |
l10n_pt_report_template_footer_document_type_and_number_oneline |
l10n_pt_report_template_footer_document_type_and_number_oneline | ir.ui.view | qweb | New |
l10n_pt_report_template_note_certified_program |
l10n_pt_report_template_note_certified_program | ir.ui.view | qweb | New |
l10n_pt_report_template_note_document_purpose |
l10n_pt_report_template_note_document_purpose | ir.ui.view | qweb | New |
l10n_pt_report_template_print_version_and_cancellation |
l10n_pt_report_template_print_version_and_cancellation | ir.ui.view | qweb | New |
pt_cancel_wizard_view |
Invoice Cancel | l10n_pt.cancel | form | New |
report_hash_integrity_content |
report_hash_integrity_content | 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 | Inherits account.report_invoice_document |
res_config_settings_view_form_inherit_pt |
res.config.settings.view.form.inherit.pt | res.config.settings | form | Inherits account.res_config_settings_view_form |
view_account_journal_form_inherit_pt |
account.journal.form.inherit.pt | account.journal | form | Inherits account.view_account_journal_form |
view_account_move_reversal_inherit_pt |
account.move.reversal.form.inherit.pt | account.move.reversal | form | Inherits account.view_account_move_reversal |
view_account_payment_form_inherit_pt |
account.payment.form.inherit.pt | account.payment | form | Inherits account.view_account_payment_form |
view_account_payment_register_form_inherit_pt |
account.payment.register.view.form.inherit.pt | account.payment.register | form | Inherits account.view_account_payment_register_form |
view_account_payment_tree_inherit_pt |
account.payment.tree.inherit.pt | account.payment | tree | Inherits account.view_account_payment_tree |
view_l10n_pt_at_series_form |
at.series.form | l10n_pt.at.series | form | New |
view_l10n_pt_at_series_search |
at.series.search.view | l10n_pt.at.series | search | New |
view_l10n_pt_at_series_tree |
at.series.tree | l10n_pt.at.series | list | New |
view_l10n_pt_reprint_reason |
l10n_pt.reprint.reason.form | l10n_pt.reprint.reason | form | New |
view_move_form_inherit_pt |
account.move.form.inherit.pt | account.move | form | Inherits account.view_move_form |
view_out_invoice_tree_inherit_pt |
account.move.tree.inherit.pt | account.move | tree | Inherits account.view_out_invoice_tree |
view_tax_form_inherit_pt |
account.tax.form.inherit.pt | account.tax | form | Inherits account.view_tax_form |
view_tax_group_form_inherit_pt |
account.tax.group.form.inherit.pt | account.tax.group | form | Inherits account.view_tax_group_form |
view_tax_group_tree_inherit_pt |
account.tax.group.tree.inherit.pt | account.tax.group | tree | Inherits account.view_tax_group_tree |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 22
No new fields.
Public methods (0)No public methods.
No new fields.
Public methods (0)No public methods.
-
l10n_pt_at_series_idMany2one → l10n_pt.at.seriescomodel_name='l10n_pt.at.series'compute='_compute_l10n_pt_at_series_id'readonly=Falsestore=Truestring='AT Series' -
l10n_pt_at_series_line_idMany2one → l10n_pt.at.series.linecomodel_name='l10n_pt.at.series.line'compute='_compute_l10n_pt_at_series_line_id'string='Document-specific AT Series' -
l10n_pt_atcudCharcompute='_compute_l10n_pt_atcud'help='Unique document code formed by the AT series validation code and the number of the document. Only assigned once the document is secured.'store=Truestring='Portuguese ATCUD' -
l10n_pt_cancel_reasonCharcopy=Falsehelp='Reason given by the user for cancelling this move'readonly=Truestring='Reason for Cancellation' -
l10n_pt_document_numberCharcompute='_compute_l10n_pt_document_number'help='Internal identifier for Portuguese documents, made up of the document type code,the series name, and the number of the document within the series.'store=Truestring='Unique Document Number' -
l10n_pt_document_typeSelectioncompute='_compute_l10n_pt_document_type'selection=AT_SERIES_ACCOUNTING_DOCUMENT_TYPESstore=Truestring='Portuguese Document Type' -
l10n_pt_global_discountFloatdigits='Discount'inverse='_inverse_l10n_pt_global_discount'string='Global Discount %' -
l10n_pt_hashed_onDatetimereadonly=Truestring='Hashed On' -
l10n_pt_inalterable_hash_shortCharcompute='_compute_l10n_pt_inalterable_hash'string='Short version of the Portuguese hash' -
l10n_pt_inalterable_hash_versionIntegercompute='_compute_l10n_pt_inalterable_hash'string='Portuguese hash version' -
l10n_pt_print_versionSelectioncopy=Falseselection=[('original', 'Original print'), ('reprint', 'Reprint')]string='Version of Printed Document' -
l10n_pt_qr_code_strCharcompute='_compute_l10n_pt_qr_code_str'store=True args: 'Portuguese QR Code' -
l10n_pt_show_future_date_warningBooleancompute='_compute_l10n_pt_show_future_date_warning'
-
action_open_reprint_wizard(self, action_to_return=None) -
action_post(self) -
action_print_pdf(self)PT requirement: documents being reprinted require a reprint reason -
action_reverse(self)Portuguese certification requirements: "The program must not allow the creation of credit notes regarding previously cancelled documents or already fully rectified." -
l10n_pt_verify_prerequisites_qr_code(self) -
preview_invoice(self)PT requirement: "No document in a preparatory or preview state may be printed prior to its completion and signing". -
update_l10n_pt_print_version(self) -
write(self, vals)
-
l10n_pt_line_discountFloatdefault=0.0digits='Discount'inverse='_inverse_l10n_pt_line_discount'string='Line Discount'
No public methods.
No new fields.
Public methods (1)-
reverse_moves(self, is_modify=False)
No new fields.
Public methods (0)No public methods.
No new fields.
Public methods (2)-
action_open_reprint_wizard(self) -
action_send_and_print(self, allow_fallback_pdf=False)
-
l10n_pt_at_series_idMany2one → l10n_pt.at.seriescomodel_name='l10n_pt.at.series'compute='_compute_l10n_pt_at_series_id'readonly=Falsestore=Truestring='AT Series' -
l10n_pt_at_series_line_idMany2one → l10n_pt.at.series.linecomodel_name='l10n_pt.at.series.line'compute='_compute_l10n_pt_at_series_line_id'string='Document-specific AT Series' -
l10n_pt_atcudCharcompute='_compute_l10n_pt_atcud'help='Unique document code formed by the AT series validation code and the number of the document.'store=Truestring='Portuguese ATCUD' -
l10n_pt_cancel_reasonCharcopy=Falsehelp='Reason given by the user for cancelling this payment'readonly=Truestring='Reason for Cancellation' -
l10n_pt_document_numberCharcompute='_compute_l10n_pt_document_number'help='Unique identifier for Portuguese documents, made up of the internal document type code, the series name, and the number of the document within the series.'store=Truestring='Unique Document Number' -
l10n_pt_document_typeSelectioncompute='_compute_l10n_pt_document_type'selection=AT_SERIES_ACCOUNTING_DOCUMENT_TYPESstore=Truestring='Portuguese Document Type' -
l10n_pt_print_versionSelectioncopy=Falseselection=[('original', 'Original print'), ('reprint', 'Reprint')]string='Version of Printed Document' -
l10n_pt_show_future_date_warningBooleancompute='_compute_l10n_pt_show_future_date_warning'
-
action_open_reprint_wizard(self)PT requirement: documents being reprinted require a reprint reason -
action_post(self) -
is_pt_inbound(self) -
update_l10n_pt_print_version(self) -
write(self, vals)
-
l10n_pt_payment_mechanismSelectiondefault='TB'help="This payment method's mechanism according to Portuguese requirements."selection=L10N_PT_PAYMENT_MECHANISMSstring='Payment Mechanism'
No public methods.
-
available_l10n_pt_at_series_idsMany2many → l10n_pt.at.seriescompute='_compute_available_l10n_pt_at_series_ids' args: 'l10n_pt.at.series' -
l10n_pt_at_series_idMany2one → l10n_pt.at.seriescomodel_name='l10n_pt.at.series'compute='_compute_l10n_pt_at_series_id'domain="[('payment_journal_id', '=', available_l10n_pt_at_series_ids)]"readonly=Falsestore=Truestring='AT Series'
No public methods.
-
l10n_pt_tax_exemption_reasonSelectionselection=L10N_PT_TAX_EXEMPTION_REASONS_SELECTIONstring='Tax Exemption Reason'
No public methods.
-
l10n_pt_tax_categorySelectiondefault='N'selection=L10N_PT_TAX_CATEGORIES_SELECTIONstring='Tax Category (PT)' -
l10n_pt_tax_regionSelectiondefault='PT'selection=L10N_PT_TAX_REGIONS_SELECTIONstring='Region (PT)'
No public methods.
No new fields.
Public methods (0)No public methods.
-
cancelledBooleanstring='Canceled' -
company_idMany2one → res.companyreadonly=True args: 'res.company', 'Company' -
originalBooleanstring='Original Print' -
report_binaryBinaryrequired=Truestring='File Binary' -
report_nameCharrequired=Truestring='Report' -
res_idMany2oneReferencemodel_field='res_model'required=Truestring='Record id' -
res_modelCharrequired=Truestring='Model'
No public methods.
-
activeBooleancompute='_compute_active'search='_search_active' -
at_series_line_idsOne2many → l10n_pt.at.series.linecopy=Truestring='Document Types' args: 'l10n_pt.at.series.line', 'at_series_id' -
company_exclusive_seriesBooleanhelp='If checked, this series will only be used by one company and not shared across branches'string='Exclusive Series' -
company_idMany2one → res.companydefault=<expr>required=True args: 'res.company' -
date_endDateargs: 'End Date' -
nameCharhelp='The name of the series will be part of the document number sequence.'required=True args: 'Name of the Series' -
payment_journal_idMany2one → account.journalcheck_company=Truedomain="[('type', 'in', ('bank', 'credit', 'cash'))]"help='This series will be available for payments belonging to this, and only this, journal.'string='Payment Journal' args: 'account.journal' -
sale_journal_idMany2one → account.journalcheck_company=Truedomain="[('type', '=', 'sale')]"help='This series will be available for account moves belonging to this, and only this, journal.'string='Sales Journal' args: 'account.journal' -
training_seriesBooleanargs: 'Training Series'
-
write(self, vals)
-
at_codeCharrequired=True args: 'AT Validation Code' -
at_series_activeBooleanrelated='at_series_id.active' -
at_series_idMany2one → l10n_pt.at.seriescheck_company=Trueondelete='cascade'readonly=Truerequired=Truestring='AT Series' args: 'l10n_pt.at.series' -
company_exclusive_seriesBooleanrelated='at_series_id.company_exclusive_series' -
company_idMany2oneindex=Trueprecompute=Truereadonly=Truerelated='at_series_id.company_id'store=True -
document_identifierCharcompute='_compute_document_identifier'help="The unique identification of documents of this series and type made up of the document type prefix and the series name, followed by '/' and the number of the document." args: 'Document Identifier' -
prefixCharhelp='The internal code of the document type that will be combined with the Series Name to form the unique identification of documents.'required=Truestring='Document-specific Series Prefix' -
typeSelectionhelp='Customer Invoices require an Invoice (FT) series, and Sales Receipts require a Simplified Invoice (FS) series.'required=Trueselection=AT_SERIES_ACCOUNTING_DOCUMENT_TYPESstring='Document Type' -
type_nameCharcompute='_compute_type_name' args: 'Type Name'
-
write(self, vals)
-
l10n_pt_cancel_reasonCharhelp='Reason to cancel this document.'required=Truestring='Cancel Reason'
-
button_cancel(self)
-
reasonCharrequired=Truestring='Reason for reprinting the document'
-
action_log_and_print(self)
No new fields.
Public methods (1)-
create(self, values)@api.model_create_multi
No new fields.
Public methods (2)-
create(self, values)@api.model_create_multi -
write(self, values)
-
l10n_pt_region_codeCharcompute='_compute_l10n_pt_region_code'readonly=Falsestore=True args: 'Region Code'
-
onchange_country(self)@api.onchange('country_id')Portuguese companies use round_globally as tax_calculation_rounding_method to ensure rounding conforms with the requirements from Autoridade Tributaria
No new fields.
Public methods (1)-
write(self, values)