19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:31:28 +01:00
parent ff721d030e
commit 7721452493
1826 changed files with 124775 additions and 274114 deletions

View file

@ -4,7 +4,7 @@
Functional
----------
In some Latinamerica countries, including Argentina and Chile, some accounting transactions like invoices and vendor bills are classified by a document types defined by the government fiscal authorities (In Argentina case AFIP, Chile case SII).
In some Latinamerica countries, including Argentina and Chile, some accounting transactions like invoices and vendor bills are classified by a document types defined by the government fiscal authorities (In Argentina case ARCA, Chile case SII).
This module is intended to be extended by localizations in order to manage these document types and is an essential information that needs to be displayed in the printed reports and that needs to be easily identified, within the set of invoices as well of account moves.
@ -28,38 +28,15 @@ pip install odoo-bringout-oca-ocb-l10n_latam_invoice_document
## Dependencies
This addon depends on:
- account
- account_debit_note
## Manifest Information
- **Name**: LATAM Document
- **Version**: 1.0
- **Category**: Accounting/Localizations
- **License**: LGPL-3
- **Installable**: True
## Source
Based on [OCA/OCB](https://github.com/OCA/OCB) branch 16.0, addon `l10n_latam_invoice_document`.
- Repository: https://github.com/OCA/OCB
- Branch: 19.0
- Path: addons/l10n_latam_invoice_document
## License
This package maintains the original LGPL-3 license from the upstream Odoo project.
## Documentation
- Overview: doc/OVERVIEW.md
- Architecture: doc/ARCHITECTURE.md
- Models: doc/MODELS.md
- Controllers: doc/CONTROLLERS.md
- Wizards: doc/WIZARDS.md
- Reports: doc/REPORTS.md
- Security: doc/SECURITY.md
- Install: doc/INSTALL.md
- Usage: doc/USAGE.md
- Configuration: doc/CONFIGURATION.md
- Dependencies: doc/DEPENDENCIES.md
- Troubleshooting: doc/TROUBLESHOOTING.md
- FAQ: doc/FAQ.md
This package preserves the original LGPL-3 license.

View file

@ -9,7 +9,7 @@
Functional
----------
In some Latinamerica countries, including Argentina and Chile, some accounting transactions like invoices and vendor bills are classified by a document types defined by the government fiscal authorities (In Argentina case AFIP, Chile case SII).
In some Latinamerica countries, including Argentina and Chile, some accounting transactions like invoices and vendor bills are classified by a document types defined by the government fiscal authorities (In Argentina case ARCA, Chile case SII).
This module is intended to be extended by localizations in order to manage these document types and is an essential information that needs to be displayed in the printed reports and that needs to be easily identified, within the set of invoices as well of account moves.

View file

@ -1,29 +1,33 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_latam_invoice_document
# * l10n_latam_invoice_document
#
# "Fernanda Alvarez (mfar)" <mfar@odoo.com>, 2026.
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Project-Id-Version: Odoo Server 18.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-30 18:44+0000\n"
"PO-Revision-Date: 2020-03-30 18:44+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"POT-Creation-Date: 2025-12-30 19:08+0000\n"
"PO-Revision-Date: 2026-02-28 09:33+0000\n"
"Last-Translator: \"Fernanda Alvarez (mfar)\" <mfar@odoo.com>\n"
"Language-Team: Spanish (Latin America) <https://translate.odoo.com/projects/"
"odoo-19-l10n/l10n_latam_invoice_document/es_419/>\n"
"Language: es_419\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.14.3\n"
#. module: l10n_latam_invoice_document
#: model:ir.model,name:l10n_latam_invoice_document.model_account_chart_template
msgid "Account Chart Template"
msgstr "Plantilla de Plan de Cuentas"
msgstr "Plantilla de plan contable"
#. module: l10n_latam_invoice_document
#: model:ir.model,name:l10n_latam_invoice_document.model_account_move_reversal
msgid "Account Move Reversal"
msgstr "Revocación de movimiento en cuenta"
msgstr "Reversión de movimiento de cuenta"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type__active
@ -31,6 +35,16 @@ msgstr "Revocación de movimiento en cuenta"
msgid "Active"
msgstr "Activo"
#. module: l10n_latam_invoice_document
#: model:ir.model,name:l10n_latam_invoice_document.model_account_debit_note
msgid "Add Debit Note wizard"
msgstr "Asistente para agregar nota de débito"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields.selection,name:l10n_latam_invoice_document.selection__l10n_latam_document_type__internal_type__all
msgid "All Documents"
msgstr "Todos los documentos"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_l10n_latam_document_type__internal_type
msgid ""
@ -38,10 +52,16 @@ msgid ""
"identify the kind of document we are working with. (not only related to "
"account.move, could be for documents of other models like stock.picking)"
msgstr ""
"Análogo a account.move.type de Odoo pero con más opciones, permitiendo "
"identificar el tipo de documento sobre el que estamos trabajando. (no "
"solamente relativo a account.move, podría ser relativo a otros modelos, como"
" por ejemplo stock.picking)"
"Análogo a account.move.move_type de Odoo, pero con más opciones que te "
"permiten identificar el tipo de documento con el que trabajas. (No solo se "
"relaciona con account.move, también puede aplicar a documentos de otros "
"modelos como stock.picking)"
#. module: l10n_latam_invoice_document
#: model:ir.model.constraint,message:l10n_latam_invoice_document.constraint_account_move_unique_name
#: model:ir.model.constraint,message:l10n_latam_invoice_document.constraint_account_move_unique_name_latam
msgid "Another entry with the same name already exists."
msgstr "Ya existe otro registro con el mismo nombre."
#. module: l10n_latam_invoice_document
#: model_terms:ir.ui.view,arch_db:l10n_latam_invoice_document.view_document_type_filter
@ -54,6 +74,8 @@ msgid "Code"
msgstr "Código"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_account_bank_statement_line__l10n_latam_document_type_id_code
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_account_move__l10n_latam_document_type_id_code
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_l10n_latam_document_type__code
msgid "Code used by different localizations"
msgstr "Código usando por diferentes localizaciones"
@ -61,27 +83,17 @@ msgstr "Código usando por diferentes localizaciones"
#. module: l10n_latam_invoice_document
#: model:ir.model,name:l10n_latam_invoice_document.model_res_company
msgid "Companies"
msgstr "Compañías"
msgstr "Empresas"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type__country_id
msgid "Country"
msgstr "País"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_journal__l10n_latam_country_code
msgid "Country Code"
msgstr "Código País"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_country_code
msgid "Country Code (LATAM)"
msgstr "Código País (LATAM)"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_l10n_latam_document_type__country_id
msgid "Country in which this type of document is valid"
msgstr "País donde el tipo de documento es valido"
msgstr "País donde este tipo de documento es válido"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type__create_uid
@ -104,22 +116,38 @@ msgid "Debit Notes"
msgstr "Notas de Débito"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_chart_template__display_name
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_debit_note__display_name
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_invoice_report__display_name
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_journal__display_name
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__display_name
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__display_name
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_reversal__display_name
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type__display_name
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_res_company__display_name
msgid "Display Name"
msgstr "Nombre a mostrar"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_bank_statement_line__l10n_latam_document_type_id_code
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_document_type_id_code
msgid "Doc Type"
msgstr "Tipo de Doc"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type__doc_code_prefix
msgid "Document Code Prefix"
msgstr "Prefijo del código de documento"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_bank_statement_line__l10n_latam_document_number
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_document_number
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_reversal__l10n_latam_document_number
msgid "Document Number"
msgstr "Número de Documento"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_bank_statement_line__l10n_latam_document_type_id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_invoice_report__l10n_latam_document_type_id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_document_type_id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__l10n_latam_document_type_id
@ -141,26 +169,28 @@ msgid "Document Types"
msgstr "Tipos de Documentos"
#. module: l10n_latam_invoice_document
#: model_terms:ir.ui.view,arch_db:l10n_latam_invoice_document.view_document_type_filter
msgid "Group By..."
msgstr "Agrupar por..."
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_chart_template__id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_debit_note__id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_invoice_report__id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_journal__id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_reversal__id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type__id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_res_company__id
msgid "ID"
msgstr "ID (identificación)"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_account_journal__l10n_latam_use_documents
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_account_move__l10n_latam_use_documents
msgid ""
"If active: will be using for legal invoicing (invoices, debit/credit notes)."
" If not set means that will be used to register accounting entries not "
"If active: will be using for legal invoicing (invoices, debit/credit notes). "
"If not set means that will be used to register accounting entries not "
"related to invoicing legal documents. For Example: Receipts, Tax Payments, "
"Register journal entries"
msgstr ""
"Si esta activo: será utilizado para facturación (facturas, notas de débito y"
" crédito). SI esta desactivado significa que que será usado para registrar "
"Si esta activo: será utilizado para facturación (facturas, notas de débito y "
"crédito). Si esta desactivado significa que que será usado para registrar "
"movimientos contables que no están relacionas con facturación como tal. Por "
"ejemplo: Recibos, Pagos de Impuestos, Registrar asientos contables"
@ -187,8 +217,8 @@ msgstr "Diario"
#. module: l10n_latam_invoice_document
#: model:ir.model,name:l10n_latam_invoice_document.model_account_move
msgid "Journal Entries"
msgstr "Asientos contables"
msgid "Journal Entry"
msgstr "Asiento contable"
#. module: l10n_latam_invoice_document
#: model:ir.model,name:l10n_latam_invoice_document.model_account_move_line
@ -196,51 +226,24 @@ msgid "Journal Item"
msgstr "Apunte contable"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_amount_untaxed
msgid "L10N Latam Amount Untaxed"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_bank_statement_line__l10n_latam_available_document_type_ids
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_available_document_type_ids
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_reversal__l10n_latam_available_document_type_ids
msgid "L10N Latam Available Document Type"
msgstr ""
msgstr "Tipo de documento disponible"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_journal__l10n_latam_company_use_documents
msgid "L10N Latam Company Use Documents"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__l10n_latam_price_net
msgid "L10N Latam Price Net"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__l10n_latam_price_subtotal
msgid "L10N Latam Price Subtotal"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__l10n_latam_price_unit
msgid "L10N Latam Price Unit"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_tax_ids
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__l10n_latam_tax_ids
msgid "L10N Latam Tax"
msgstr ""
msgstr "Usar documentos de la empresa"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_bank_statement_line__l10n_latam_use_documents
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_use_documents
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__l10n_latam_use_documents
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_reversal__l10n_latam_use_documents
msgid "L10N Latam Use Documents"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type____last_update
msgid "Last Modified on"
msgstr "Última modificación en"
msgstr "Usar documentos"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type__write_uid
@ -263,6 +266,7 @@ msgid "Localization"
msgstr "Localización"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_bank_statement_line__l10n_latam_manual_document_number
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_manual_document_number
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_reversal__l10n_latam_manual_document_number
msgid "Manual Number"
@ -281,20 +285,20 @@ msgstr "Nombre en Reportes"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_l10n_latam_document_type__report_name
msgid "Name that will be printed in reports, for example \"CREDIT NOTE\""
msgstr "Nombre que será impreso en los reportes, por ejemplo \"NOTA DE CREDITO\""
msgstr ""
"Nombre que será impreso en los reportes, por ejemplo \"NOTA DE CREDITO\""
#. module: l10n_latam_invoice_document
#. odoo-python
#: code:addons/l10n_latam_invoice_document/models/account_move.py:0
#, python-format
msgid "Please set the document number on the following invoices %s."
msgstr ""
"Por favor asigne el número de documento en las siguientes facturas %s."
msgstr "Por favor asigne el número de documento en las siguientes facturas %s."
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_l10n_latam_document_type__doc_code_prefix
msgid ""
"Prefix for Documents Codes on Invoices and Account Moves. For eg. 'FA ' will"
" build 'FA 0001-0000001' Document Number"
"Prefix for Documents Codes on Invoices and Account Moves. For eg. 'FA ' will "
"build 'FA 0001-0000001' Document Number"
msgstr ""
"Prefijo para Códigos de Documentos en Facturas y Asientos. Por eje: 'FA ' "
"será construirá 'FA 0001-0000001' como el numero de documento"
@ -314,21 +318,14 @@ msgstr "Mostrar tipos de documento activos"
msgid "Show archived document types"
msgstr "Mostrar tipos de documento archivados"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_account_journal__l10n_latam_country_code
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_account_move__l10n_latam_country_code
msgid "Technical field used to hide/show fields regarding the localization"
msgstr ""
"Campo técnico usado para esconder/mostrar dependiendo de la liocalización"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_l10n_latam_document_type__name
msgid "The document name"
msgstr "El nombre del documento"
#. module: l10n_latam_invoice_document
#. odoo-python
#: code:addons/l10n_latam_invoice_document/models/account_move.py:0
#, python-format
msgid ""
"The journal require a document type but not document type has been selected "
"on invoices %s."
@ -347,53 +344,45 @@ msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_journal__l10n_latam_use_documents
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_use_documents
msgid "Use Documents?"
msgstr "Usa Documentos?"
#. module: l10n_latam_invoice_document
#. odoo-python
#: code:addons/l10n_latam_invoice_document/models/account_move.py:0
#, python-format
msgid "Vendor bill number must be unique per vendor and company."
msgstr ""
"El número de la Factura de Proveedor debe ser único por proveedor y por "
"compañía."
#. module: l10n_latam_invoice_document
#: code:addons/l10n_latam_invoice_document/models/account_move.py:0
#, python-format
msgid "We do not accept the usage of document types on receipts yet. "
msgstr "Todavía no aceptamos el uso de tipos de documentos en los recibos."
#. module: l10n_latam_invoice_document
#. odoo-python
#: code:addons/l10n_latam_invoice_document/models/account_journal.py:0
#, python-format
msgid ""
"You can not modify the field \"Use Documents?\" if there are validated "
"invoices in this journal!"
msgstr ""
"No puedes modificar el campo \"Usa Documentos?\" si ya existen facturas "
"validades en este diario!"
"validadas en este diario!"
#. module: l10n_latam_invoice_document
#. odoo-python
#: code:addons/l10n_latam_invoice_document/models/account_move.py:0
#, python-format
msgid "You can not use a %s document type with a invoice"
msgstr "No puedes utilizar el tipo de documento %s en una factura"
#. module: l10n_latam_invoice_document
#. odoo-python
#: code:addons/l10n_latam_invoice_document/models/account_move.py:0
#, python-format
msgid "You can not use a %s document type with a refund invoice"
msgstr ""
"No puedes utilizar el tipo de documento %s en una factura de reembolso"
msgstr "No puedes utilizar el tipo de documento %s en una factura de reembolso"
#. module: l10n_latam_invoice_document
#. odoo-python
#: code:addons/l10n_latam_invoice_document/wizards/account_move_reversal.py:0
#, python-format
msgid ""
"You can only reverse documents with legal invoicing documents from Latin America one at a time.\n"
"You can only reverse documents with legal invoicing documents from Latin "
"America one at a time.\n"
"Problematic documents: %s"
msgstr ""
"Solo puede revertir documentos con documentos de facturación legales de Latino américa de uno en uno.\n"
"Solo puede revertir documentos con documentos de facturación legales de "
"Latino américa de uno en uno.\n"
"Documentos problemáticos:%s"

View file

@ -1,200 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_latam_invoice_document
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-09-08 16:49+0000\n"
"PO-Revision-Date: 2020-09-08 16:49+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_document_number
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_reversal__l10n_latam_document_number
msgid "Document Number"
msgstr "Número de Comprobante"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_invoice_report__l10n_latam_document_type_id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_document_type_id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__l10n_latam_document_type_id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_reversal__l10n_latam_document_type_id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_ir_sequence__l10n_latam_document_type_id
#: model_terms:ir.ui.view,arch_db:l10n_latam_invoice_document.view_account_invoice_filter
#: model_terms:ir.ui.view,arch_db:l10n_latam_invoice_document.view_account_invoice_report_search
#: model_terms:ir.ui.view,arch_db:l10n_latam_invoice_document.view_account_move_filter
#: model_terms:ir.ui.view,arch_db:l10n_latam_invoice_document.view_account_move_line_filter
#: model_terms:ir.ui.view,arch_db:l10n_latam_invoice_document.view_document_type_filter
#: model_terms:ir.ui.view,arch_db:l10n_latam_invoice_document.view_document_type_form
#: model_terms:ir.ui.view,arch_db:l10n_latam_invoice_document.view_document_type_tree
msgid "Document Type"
msgstr "Tipo de Comprobante"
#. module: l10n_latam_invoice_document
#: model:ir.actions.act_window,name:l10n_latam_invoice_document.action_document_type
#: model:ir.ui.menu,name:l10n_latam_invoice_document.menu_document_type
msgid "Document Types"
msgstr "Tipos de Comprobantes"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_amount_untaxed
msgid "L10N Latam Amount Untaxed"
msgstr "Base imponible"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_available_document_type_ids
msgid "L10N Latam Available Document Type"
msgstr "Tipo de Comprobante Disponible"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_bank_statement_import_journal_creation__l10n_latam_company_use_documents
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_journal__l10n_latam_company_use_documents
msgid "L10N Latam Company Use Documents"
msgstr "Es Fiscal"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__l10n_latam_price_net
msgid "L10N Latam Price Net"
msgstr "Precio Neto"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__l10n_latam_price_subtotal
msgid "L10N Latam Price Subtotal"
msgstr "Subtotal"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__l10n_latam_price_unit
msgid "L10N Latam Price Unit"
msgstr "Precio"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_sequence_id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_reversal__l10n_latam_sequence_id
msgid "L10N Latam Sequence"
msgstr "Secuencia"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_tax_ids
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__l10n_latam_tax_ids
msgid "L10N Latam Tax"
msgstr "Impuestos"
#. module: l10n_latam_invoice_document
#: model:ir.model,name:l10n_latam_invoice_document.model_l10n_latam_document_type
msgid "Latam Document Type"
msgstr "Tipo de Comprobante"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_l10n_latam_document_type__report_name
msgid "Name that will be printed in reports, for example \"CREDIT NOTE\""
msgstr "Nombre que será impreso en los reportes, por ejemplo \"NOTA DE CREDITO\""
#. module: l10n_latam_invoice_document
#: code:addons/l10n_latam_invoice_document/models/account_move.py:0
#, python-format
msgid "No sequence or document number linked to invoice id %s"
msgstr "No hay secuencia o número de comprobante vinculado a la factura %s"
#. module: l10n_latam_invoice_document
#: code:addons/l10n_latam_invoice_document/models/account_move.py:0
#, python-format
msgid "Please set the document number on the following invoices %s."
msgstr ""
"Por favor asigne el número de comprobante en las siguientes facturas %s."
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_l10n_latam_document_type__doc_code_prefix
msgid ""
"Prefix for Documents Codes on Invoices and Account Moves. For eg. 'FA ' will"
" build 'FA 0001-0000001' Document Number"
msgstr ""
"Prefijo para Códigos de Comprobante en Facturas y Asientos. Por eje: 'FA ' "
"será construirá 'FA 0001-0000001' como el numero de comprobante"
#. module: l10n_latam_invoice_document
#: model:ir.model,name:l10n_latam_invoice_document.model_ir_sequence
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type__sequence
msgid "Sequence"
msgstr "Secuencia"
#. module: l10n_latam_invoice_document
#: model_terms:ir.ui.view,arch_db:l10n_latam_invoice_document.view_document_type_filter
msgid "Show active document types"
msgstr "Mostrar tipos de comprobante activos"
#. module: l10n_latam_invoice_document
#: model_terms:ir.ui.view,arch_db:l10n_latam_invoice_document.view_document_type_filter
msgid "Show archived document types"
msgstr "Mostrar tipos de comprobante archivados"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_l10n_latam_document_type__name
msgid "The document name"
msgstr "El nombre del comprobante"
#. module: l10n_latam_invoice_document
#: code:addons/l10n_latam_invoice_document/models/account_move.py:0
#, python-format
msgid ""
"The journal require a document type but not document type has been selected "
"on invoices %s."
msgstr ""
"El diario requiere un tipo de comprobante pero no hay tipo de documento "
"seleccionado en las facturas %s."
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_l10n_latam_document_type__sequence
msgid ""
"To set in which order show the documents type taking into account the most "
"commonly used first"
msgstr ""
"Para seleccionar en que orden deben mostrar los tipos de comprobante teniendo "
"en cuenta los más usados comunmente"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_bank_statement_import_journal_creation__l10n_latam_use_documents
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_journal__l10n_latam_use_documents
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_use_documents
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_reversal__l10n_latam_use_documents
msgid "Use Documents?"
msgstr "Es fiscal?"
#. module: l10n_latam_invoice_document
#: code:addons/l10n_latam_invoice_document/models/account_journal.py:0
#, python-format
msgid ""
"You can not modify the field \"Use Documents?\" if there are validated "
"invoices in this journal!"
msgstr ""
"No puedes modificar el campo \"Es Fiscal?\" si ya existen facturas "
"validades en este diario!"
#. module: l10n_latam_invoice_document
#: code:addons/l10n_latam_invoice_document/models/account_move.py:0
#, python-format
msgid "You can not use a %s document type with a invoice"
msgstr "No puedes utilizar el tipo de comprobante %s en una factura"
#. module: l10n_latam_invoice_document
#: code:addons/l10n_latam_invoice_document/models/account_move.py:0
#, python-format
msgid "You can not use a %s document type with a refund invoice"
msgstr ""
"No puedes utilizar el tipo de comprobante %s en una nota de crédito"
#. module: l10n_latam_invoice_document
#: code:addons/l10n_latam_invoice_document/wizards/account_move_reversal.py:0
#, python-format
msgid ""
"You can only reverse documents with legal invoicing documents from Latin America one at a time.\n"
"Problematic documents: %s"
msgstr ""
"Solo puede aplicar Notas de Crédito a un documento a la vez.\n"
"Documento con problemas: %s"

View file

@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.3alpha1+e\n"
"Project-Id-Version: Odoo Server 19.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-30 18:43+0000\n"
"PO-Revision-Date: 2020-03-30 18:43+0000\n"
"POT-Creation-Date: 2025-12-30 19:08+0000\n"
"PO-Revision-Date: 2025-12-30 19:08+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -31,6 +31,16 @@ msgstr ""
msgid "Active"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model,name:l10n_latam_invoice_document.model_account_debit_note
msgid "Add Debit Note wizard"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields.selection,name:l10n_latam_invoice_document.selection__l10n_latam_document_type__internal_type__all
msgid "All Documents"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_l10n_latam_document_type__internal_type
msgid ""
@ -39,6 +49,12 @@ msgid ""
"account.move, could be for documents of other models like stock.picking)"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.constraint,message:l10n_latam_invoice_document.constraint_account_move_unique_name
#: model:ir.model.constraint,message:l10n_latam_invoice_document.constraint_account_move_unique_name_latam
msgid "Another entry with the same name already exists."
msgstr ""
#. module: l10n_latam_invoice_document
#: model_terms:ir.ui.view,arch_db:l10n_latam_invoice_document.view_document_type_filter
msgid "Archived"
@ -50,6 +66,8 @@ msgid "Code"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_account_bank_statement_line__l10n_latam_document_type_id_code
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_account_move__l10n_latam_document_type_id_code
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_l10n_latam_document_type__code
msgid "Code used by different localizations"
msgstr ""
@ -64,16 +82,6 @@ msgstr ""
msgid "Country"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_journal__l10n_latam_country_code
msgid "Country Code"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_country_code
msgid "Country Code (LATAM)"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_l10n_latam_document_type__country_id
msgid "Country in which this type of document is valid"
@ -100,22 +108,38 @@ msgid "Debit Notes"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_chart_template__display_name
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_debit_note__display_name
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_invoice_report__display_name
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_journal__display_name
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__display_name
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__display_name
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_reversal__display_name
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type__display_name
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_res_company__display_name
msgid "Display Name"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_bank_statement_line__l10n_latam_document_type_id_code
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_document_type_id_code
msgid "Doc Type"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type__doc_code_prefix
msgid "Document Code Prefix"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_bank_statement_line__l10n_latam_document_number
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_document_number
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_reversal__l10n_latam_document_number
msgid "Document Number"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_bank_statement_line__l10n_latam_document_type_id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_invoice_report__l10n_latam_document_type_id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_document_type_id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__l10n_latam_document_type_id
@ -137,18 +161,20 @@ msgid "Document Types"
msgstr ""
#. module: l10n_latam_invoice_document
#: model_terms:ir.ui.view,arch_db:l10n_latam_invoice_document.view_document_type_filter
msgid "Group By..."
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_chart_template__id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_debit_note__id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_invoice_report__id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_journal__id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_reversal__id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type__id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_res_company__id
msgid "ID"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_account_journal__l10n_latam_use_documents
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_account_move__l10n_latam_use_documents
msgid ""
"If active: will be using for legal invoicing (invoices, debit/credit notes)."
" If not set means that will be used to register accounting entries not "
@ -179,7 +205,7 @@ msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model,name:l10n_latam_invoice_document.model_account_move
msgid "Journal Entries"
msgid "Journal Entry"
msgstr ""
#. module: l10n_latam_invoice_document
@ -188,11 +214,7 @@ msgid "Journal Item"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_amount_untaxed
msgid "L10N Latam Amount Untaxed"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_bank_statement_line__l10n_latam_available_document_type_ids
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_available_document_type_ids
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_reversal__l10n_latam_available_document_type_ids
msgid "L10N Latam Available Document Type"
@ -204,36 +226,13 @@ msgid "L10N Latam Company Use Documents"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__l10n_latam_price_net
msgid "L10N Latam Price Net"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__l10n_latam_price_subtotal
msgid "L10N Latam Price Subtotal"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__l10n_latam_price_unit
msgid "L10N Latam Price Unit"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_tax_ids
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__l10n_latam_tax_ids
msgid "L10N Latam Tax"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_bank_statement_line__l10n_latam_use_documents
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_use_documents
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__l10n_latam_use_documents
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_reversal__l10n_latam_use_documents
msgid "L10N Latam Use Documents"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type____last_update
msgid "Last Modified on"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type__write_uid
msgid "Last Updated by"
@ -255,6 +254,7 @@ msgid "Localization"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_bank_statement_line__l10n_latam_manual_document_number
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_manual_document_number
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_reversal__l10n_latam_manual_document_number
msgid "Manual Number"
@ -276,8 +276,8 @@ msgid "Name that will be printed in reports, for example \"CREDIT NOTE\""
msgstr ""
#. module: l10n_latam_invoice_document
#. odoo-python
#: code:addons/l10n_latam_invoice_document/models/account_move.py:0
#, python-format
msgid "Please set the document number on the following invoices %s."
msgstr ""
@ -303,20 +303,14 @@ msgstr ""
msgid "Show archived document types"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_account_journal__l10n_latam_country_code
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_account_move__l10n_latam_country_code
msgid "Technical field used to hide/show fields regarding the localization"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_l10n_latam_document_type__name
msgid "The document name"
msgstr ""
#. module: l10n_latam_invoice_document
#. odoo-python
#: code:addons/l10n_latam_invoice_document/models/account_move.py:0
#, python-format
msgid ""
"The journal require a document type but not document type has been selected "
"on invoices %s."
@ -331,45 +325,38 @@ msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_journal__l10n_latam_use_documents
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_use_documents
msgid "Use Documents?"
msgstr ""
#. module: l10n_latam_invoice_document
#. odoo-python
#: code:addons/l10n_latam_invoice_document/models/account_move.py:0
#, python-format
msgid "Vendor bill number must be unique per vendor and company."
msgstr ""
#. module: l10n_latam_invoice_document
#: code:addons/l10n_latam_invoice_document/models/account_move.py:0
#, python-format
msgid "We do not accept the usage of document types on receipts yet. "
msgstr ""
#. module: l10n_latam_invoice_document
#. odoo-python
#: code:addons/l10n_latam_invoice_document/models/account_journal.py:0
#, python-format
msgid ""
"You can not modify the field \"Use Documents?\" if there are validated "
"invoices in this journal!"
msgstr ""
#. module: l10n_latam_invoice_document
#. odoo-python
#: code:addons/l10n_latam_invoice_document/models/account_move.py:0
#, python-format
msgid "You can not use a %s document type with a invoice"
msgstr ""
#. module: l10n_latam_invoice_document
#. odoo-python
#: code:addons/l10n_latam_invoice_document/models/account_move.py:0
#, python-format
msgid "You can not use a %s document type with a refund invoice"
msgstr ""
#. module: l10n_latam_invoice_document
#. odoo-python
#: code:addons/l10n_latam_invoice_document/wizards/account_move_reversal.py:0
#, python-format
msgid ""
"You can only reverse documents with legal invoicing documents from Latin America one at a time.\n"
"Problematic documents: %s"

View file

@ -4,116 +4,147 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.3alpha1+e\n"
"Project-Id-Version: Odoo Server 18.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-30 18:43+0000\n"
"PO-Revision-Date: 2020-03-30 18:43+0000\n"
"POT-Creation-Date: 2025-12-30 19:08+0000\n"
"PO-Revision-Date: 2025-03-27 17:58-0300\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: \n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: l10n_latam_invoice_document
#: model:ir.model,name:l10n_latam_invoice_document.model_account_chart_template
msgid "Account Chart Template"
msgstr ""
msgstr "Modelo de plano de contas"
#. module: l10n_latam_invoice_document
#: model:ir.model,name:l10n_latam_invoice_document.model_account_move_reversal
msgid "Account Move Reversal"
msgstr ""
msgstr "Estorno de movimentação da conta"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type__active
#: model_terms:ir.ui.view,arch_db:l10n_latam_invoice_document.view_document_type_filter
msgid "Active"
msgstr ""
msgstr "Ativo"
#. module: l10n_latam_invoice_document
#: model:ir.model,name:l10n_latam_invoice_document.model_account_debit_note
msgid "Add Debit Note wizard"
msgstr "Assistente Adicionar nota de débito"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields.selection,name:l10n_latam_invoice_document.selection__l10n_latam_document_type__internal_type__all
msgid "All Documents"
msgstr "Todos os documentos"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_l10n_latam_document_type__internal_type
msgid "Analog to odoo account.move.move_type but with more options allowing to identify the kind of document we are working with. (not only related to account.move, could be for documents of other models like stock.picking)"
msgid ""
"Analog to odoo account.move.move_type but with more options allowing to "
"identify the kind of document we are working with. (not only related to "
"account.move, could be for documents of other models like stock.picking)"
msgstr ""
"Análogo ao account.move.move_type do Odoo, mas com mais opções que permitem "
"identificar com que tipo de documento estamos trabalhando. (relacionado não "
"apenas com account.move, pode servir para documentos de outros modelos, como "
"stock.picking)"
#. module: l10n_latam_invoice_document
#: model:ir.model.constraint,message:l10n_latam_invoice_document.constraint_account_move_unique_name
#: model:ir.model.constraint,message:l10n_latam_invoice_document.constraint_account_move_unique_name_latam
msgid "Another entry with the same name already exists."
msgstr "Já existe outra entrada com o mesmo nome."
#. module: l10n_latam_invoice_document
#: model_terms:ir.ui.view,arch_db:l10n_latam_invoice_document.view_document_type_filter
msgid "Archived"
msgstr ""
msgstr "Arquivado"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type__code
msgid "Code"
msgstr ""
msgstr "Código"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_account_bank_statement_line__l10n_latam_document_type_id_code
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_account_move__l10n_latam_document_type_id_code
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_l10n_latam_document_type__code
msgid "Code used by different localizations"
msgstr ""
msgstr "Código usado opor diferentes localizações"
#. module: l10n_latam_invoice_document
#: model:ir.model,name:l10n_latam_invoice_document.model_res_company
msgid "Companies"
msgstr ""
msgstr "Empresas"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type__country_id
msgid "Country"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_journal__l10n_latam_country_code
msgid "Country Code"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_country_code
msgid "Country Code (LATAM)"
msgstr ""
msgstr "País"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_l10n_latam_document_type__country_id
msgid "Country in which this type of document is valid"
msgstr ""
msgstr "País em que este tipo de documento é válido"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type__create_uid
msgid "Created by"
msgstr ""
msgstr "Criado por"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type__create_date
msgid "Created on"
msgstr ""
msgstr "Criado em"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields.selection,name:l10n_latam_invoice_document.selection__l10n_latam_document_type__internal_type__credit_note
msgid "Credit Notes"
msgstr ""
msgstr "Notas de crédito"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields.selection,name:l10n_latam_invoice_document.selection__l10n_latam_document_type__internal_type__debit_note
msgid "Debit Notes"
msgstr ""
msgstr "Notas de débito"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_chart_template__display_name
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_debit_note__display_name
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_invoice_report__display_name
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_journal__display_name
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__display_name
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__display_name
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_reversal__display_name
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type__display_name
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_res_company__display_name
msgid "Display Name"
msgstr ""
msgstr "Nome de exibição"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_bank_statement_line__l10n_latam_document_type_id_code
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_document_type_id_code
msgid "Doc Type"
msgstr "Tipo do documento"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type__doc_code_prefix
msgid "Document Code Prefix"
msgstr ""
msgstr "Prefixo do código do documento"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_bank_statement_line__l10n_latam_document_number
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_document_number
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_reversal__l10n_latam_document_number
msgid "Document Number"
msgstr ""
msgstr "Número do documento"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_bank_statement_line__l10n_latam_document_type_id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_invoice_report__l10n_latam_document_type_id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_document_type_id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__l10n_latam_document_type_id
@ -126,237 +157,227 @@ msgstr ""
#: model_terms:ir.ui.view,arch_db:l10n_latam_invoice_document.view_document_type_form
#: model_terms:ir.ui.view,arch_db:l10n_latam_invoice_document.view_document_type_tree
msgid "Document Type"
msgstr ""
msgstr "Tipo de documento"
#. module: l10n_latam_invoice_document
#: model:ir.actions.act_window,name:l10n_latam_invoice_document.action_document_type
#: model:ir.ui.menu,name:l10n_latam_invoice_document.menu_document_type
msgid "Document Types"
msgstr ""
#. module: l10n_latam_invoice_document
#: model_terms:ir.ui.view,arch_db:l10n_latam_invoice_document.view_document_type_filter
msgid "Group By..."
msgstr ""
msgstr "Tipos de documento"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_chart_template__id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_debit_note__id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_invoice_report__id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_journal__id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_reversal__id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type__id
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_res_company__id
msgid "ID"
msgstr ""
msgstr "ID"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_account_journal__l10n_latam_use_documents
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_account_move__l10n_latam_use_documents
msgid "If active: will be using for legal invoicing (invoices, debit/credit notes). If not set means that will be used to register accounting entries not related to invoicing legal documents. For Example: Receipts, Tax Payments, Register journal entries"
msgid ""
"If active: will be using for legal invoicing (invoices, debit/credit notes). "
"If not set means that will be used to register accounting entries not "
"related to invoicing legal documents. For Example: Receipts, Tax Payments, "
"Register journal entries"
msgstr ""
"Se ativo: será usado para faturamento legal (faturas, notas de débito/"
"crédito). Se não definido, será usado para registrar lançamentos contábeis "
"não relacionados a documentos legais de faturamento, por exemplo: recibos, "
"pagamentos de impostos, registros de lançamentos de diário"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type__internal_type
#: model_terms:ir.ui.view,arch_db:l10n_latam_invoice_document.view_document_type_filter
msgid "Internal Type"
msgstr ""
msgstr "Tipo interno"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields.selection,name:l10n_latam_invoice_document.selection__l10n_latam_document_type__internal_type__invoice
msgid "Invoices"
msgstr ""
msgstr "Faturas"
#. module: l10n_latam_invoice_document
#: model:ir.model,name:l10n_latam_invoice_document.model_account_invoice_report
msgid "Invoices Statistics"
msgstr ""
msgstr "Estatísticas de faturas"
#. module: l10n_latam_invoice_document
#: model:ir.model,name:l10n_latam_invoice_document.model_account_journal
msgid "Journal"
msgstr ""
msgstr "Diário"
#. module: l10n_latam_invoice_document
#: model:ir.model,name:l10n_latam_invoice_document.model_account_move
msgid "Journal Entries"
msgstr ""
msgid "Journal Entry"
msgstr "Lançamento de diário"
#. module: l10n_latam_invoice_document
#: model:ir.model,name:l10n_latam_invoice_document.model_account_move_line
msgid "Journal Item"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_amount_untaxed
msgid "L10N Latam Amount Untaxed"
msgstr ""
msgstr "Item do diário"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_bank_statement_line__l10n_latam_available_document_type_ids
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_available_document_type_ids
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_reversal__l10n_latam_available_document_type_ids
msgid "L10N Latam Available Document Type"
msgstr ""
msgstr "L10N Latam - Tipo de documento disponível"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_journal__l10n_latam_company_use_documents
msgid "L10N Latam Company Use Documents"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__l10n_latam_price_net
msgid "L10N Latam Price Net"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__l10n_latam_price_subtotal
msgid "L10N Latam Price Subtotal"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__l10n_latam_price_unit
msgid "L10N Latam Price Unit"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_tax_ids
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__l10n_latam_tax_ids
msgid "L10N Latam Tax"
msgstr ""
msgstr "L10N Latam - Usar documentos da empresa"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_bank_statement_line__l10n_latam_use_documents
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_use_documents
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_line__l10n_latam_use_documents
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_reversal__l10n_latam_use_documents
msgid "L10N Latam Use Documents"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type____last_update
msgid "Last Modified on"
msgstr ""
msgstr "L10N Latam - Usar documentos"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type__write_uid
msgid "Last Updated by"
msgstr ""
msgstr "Última atualização por"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type__write_date
msgid "Last Updated on"
msgstr ""
msgstr "Última atualização em"
#. module: l10n_latam_invoice_document
#: model:ir.model,name:l10n_latam_invoice_document.model_l10n_latam_document_type
msgid "Latam Document Type"
msgstr ""
msgstr "Tipo de documento Latam"
#. module: l10n_latam_invoice_document
#: model_terms:ir.ui.view,arch_db:l10n_latam_invoice_document.view_document_type_filter
msgid "Localization"
msgstr ""
msgstr "Localização"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_bank_statement_line__l10n_latam_manual_document_number
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_manual_document_number
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move_reversal__l10n_latam_manual_document_number
msgid "Manual Number"
msgstr ""
msgstr "Número manual"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type__name
msgid "Name"
msgstr ""
msgstr "Nome"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type__report_name
msgid "Name on Reports"
msgstr ""
msgstr "Nome em Relatórios"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_l10n_latam_document_type__report_name
msgid "Name that will be printed in reports, for example \"CREDIT NOTE\""
msgstr ""
msgstr "Nome impresso em relatórios, por exemplo \"NOTA DE CRÉDITO\""
#. module: l10n_latam_invoice_document
#. odoo-python
#: code:addons/l10n_latam_invoice_document/models/account_move.py:0
#, python-format
msgid "Please set the document number on the following invoices %s."
msgstr ""
msgstr "Defina o número do documento nas seguintes faturas %s."
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_l10n_latam_document_type__doc_code_prefix
msgid "Prefix for Documents Codes on Invoices and Account Moves. For eg. 'FA ' will build 'FA 0001-0000001' Document Number"
msgid ""
"Prefix for Documents Codes on Invoices and Account Moves. For eg. 'FA ' will "
"build 'FA 0001-0000001' Document Number"
msgstr ""
"Prefixo para códigos de documentos em faturas e movimentações de contas. For "
"eg. 'FA ' will build 'FA 0001-0000001' Document Number"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_l10n_latam_document_type__sequence
msgid "Sequence"
msgstr ""
msgstr "Sequência"
#. module: l10n_latam_invoice_document
#: model_terms:ir.ui.view,arch_db:l10n_latam_invoice_document.view_document_type_filter
msgid "Show active document types"
msgstr ""
msgstr "Mostrar tipos de documentos ativos"
#. module: l10n_latam_invoice_document
#: model_terms:ir.ui.view,arch_db:l10n_latam_invoice_document.view_document_type_filter
msgid "Show archived document types"
msgstr ""
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_account_journal__l10n_latam_country_code
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_account_move__l10n_latam_country_code
msgid "Technical field used to hide/show fields regarding the localization"
msgstr ""
msgstr "Mostrar tipos de documentos arquivados"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_l10n_latam_document_type__name
msgid "The document name"
msgstr ""
msgstr "O nome do documento"
#. module: l10n_latam_invoice_document
#. odoo-python
#: code:addons/l10n_latam_invoice_document/models/account_move.py:0
#, python-format
msgid "The journal require a document type but not document type has been selected on invoices %s."
msgid ""
"The journal require a document type but not document type has been selected "
"on invoices %s."
msgstr ""
"O diário requer um tipo de documento, mas não há tipo de documento "
"selecionado nas faturas %s."
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,help:l10n_latam_invoice_document.field_l10n_latam_document_type__sequence
msgid "To set in which order show the documents type taking into account the most commonly used first"
msgid ""
"To set in which order show the documents type taking into account the most "
"commonly used first"
msgstr ""
"Para definir a ordem de exibição dos tipos de documentos, levando em "
"consideração os usados mais frequentemente"
#. module: l10n_latam_invoice_document
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_journal__l10n_latam_use_documents
#: model:ir.model.fields,field_description:l10n_latam_invoice_document.field_account_move__l10n_latam_use_documents
msgid "Use Documents?"
msgstr ""
msgstr "Usar documentos?"
#. module: l10n_latam_invoice_document
#. odoo-python
#: code:addons/l10n_latam_invoice_document/models/account_move.py:0
#, python-format
msgid "Vendor bill number must be unique per vendor and company."
msgstr ""
#. module: l10n_latam_invoice_document
#: code:addons/l10n_latam_invoice_document/models/account_move.py:0
#, python-format
msgid "We do not accept the usage of document types on receipts yet. "
msgstr ""
msgstr "Ainda não aceitamos o uso de tipos de documentos em recibos."
#. module: l10n_latam_invoice_document
#. odoo-python
#: code:addons/l10n_latam_invoice_document/models/account_journal.py:0
#, python-format
msgid "You can not modify the field \"Use Documents?\" if there are validated invoices in this journal!"
msgstr ""
#. module: l10n_latam_invoice_document
#: code:addons/l10n_latam_invoice_document/models/account_move.py:0
#, python-format
msgid "You can not use a %s document type with a invoice"
msgstr ""
#. module: l10n_latam_invoice_document
#: code:addons/l10n_latam_invoice_document/models/account_move.py:0
#, python-format
msgid "You can not use a %s document type with a refund invoice"
msgstr ""
#. module: l10n_latam_invoice_document
#: code:addons/l10n_latam_invoice_document/wizards/account_move_reversal.py:0
#, python-format
msgid ""
"You can only reverse documents with legal invoicing documents from Latin America one at a time.\n"
"You can not modify the field \"Use Documents?\" if there are validated "
"invoices in this journal!"
msgstr ""
"Você não pode modificar o campo \"Usar documentos?\" se houver faturas "
"validadas nesse diário!"
#. module: l10n_latam_invoice_document
#. odoo-python
#: code:addons/l10n_latam_invoice_document/models/account_move.py:0
msgid "You can not use a %s document type with a invoice"
msgstr "Você não pode usar um tipo de documento %s com uma fatura"
#. module: l10n_latam_invoice_document
#. odoo-python
#: code:addons/l10n_latam_invoice_document/models/account_move.py:0
msgid "You can not use a %s document type with a refund invoice"
msgstr "Você não pode usar um tipo de documento %s com uma fatura de reembolso"
#. module: l10n_latam_invoice_document
#. odoo-python
#: code:addons/l10n_latam_invoice_document/wizards/account_move_reversal.py:0
msgid ""
"You can only reverse documents with legal invoicing documents from Latin "
"America one at a time.\n"
"Problematic documents: %s"
msgstr ""
"Só é possível estornar um documento com documentos de faturamento legal da "
"América Latina de cada vez."

View file

@ -1,19 +1,16 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, api, fields, _
from odoo import models
from odoo.addons.account.models.chart_template import template
class AccountChartTemplate(models.Model):
class AccountChartTemplate(models.AbstractModel):
_inherit = 'account.chart.template'
@api.model
def _prepare_all_journals(self, acc_template_ref, company, journals_dict=None):
@template(model='account.journal')
def _get_latam_document_account_journal(self, template_code):
""" We add use_documents or not depending on the context"""
journal_data = super()._prepare_all_journals(acc_template_ref, company, journals_dict)
# if chart has localization, then we use documents by default
if company._localization_use_documents():
for vals_journal in journal_data:
if vals_journal['type'] in ['sale', 'purchase']:
vals_journal['l10n_latam_use_documents'] = True
return journal_data
if self.env.company._localization_use_documents():
return {
'sale': {'l10n_latam_use_documents': True},
'purchase': {'l10n_latam_use_documents': True},
}

View file

@ -3,8 +3,8 @@
from odoo import fields, models, api, _
from odoo.exceptions import ValidationError
class AccountJournal(models.Model):
class AccountJournal(models.Model):
_inherit = "account.journal"
l10n_latam_use_documents = fields.Boolean(
@ -23,21 +23,29 @@ class AccountJournal(models.Model):
self.l10n_latam_use_documents = self.type in ['sale', 'purchase'] and \
self.l10n_latam_company_use_documents
def _compute_has_sequence_holes(self):
use_documents_journals = self.filtered(lambda j: j.l10n_latam_use_documents)
use_documents_journals.has_sequence_holes = False
if other_journals := self - use_documents_journals:
super(AccountJournal, other_journals)._compute_has_sequence_holes()
@api.constrains('l10n_latam_use_documents')
def check_use_document(self):
for rec in self:
if rec.env['account.move'].search([('journal_id', '=', rec.id), ('posted_before', '=', True)], limit=1):
if rec.env['account.move'].search_count([('journal_id', '=', rec.id), ('posted_before', '=', True)], limit=1):
raise ValidationError(_(
'You can not modify the field "Use Documents?" if there are validated invoices in this journal!'))
@api.onchange('type', 'l10n_latam_use_documents')
def _onchange_type(self):
res = super()._onchange_type()
if self.l10n_latam_use_documents:
self.refund_sequence = False
return res
@api.depends('type', 'l10n_latam_use_documents')
def _compute_debit_sequence(self):
super()._compute_debit_sequence()
for journal in self:
if journal.l10n_latam_use_documents:
journal.debit_sequence = False
def _compute_has_sequence_holes(self):
journals_use_documents = self.filtered(lambda x: x.l10n_latam_use_documents)
journals_use_documents.has_sequence_holes = False
super(AccountJournal, self - journals_use_documents)._compute_has_sequence_holes()
@api.depends('type', 'l10n_latam_use_documents')
def _compute_refund_sequence(self):
super()._compute_refund_sequence()
for journal in self:
if journal.l10n_latam_use_documents:
journal.refund_sequence = False

View file

@ -8,9 +8,21 @@ from odoo.tools.sql import column_exists, create_column
class AccountMove(models.Model):
_inherit = "account.move"
_unique_name = models.UniqueIndex(
"(name, journal_id)"
" WHERE (state = 'posted' AND name != '/'"
" AND (l10n_latam_document_type_id IS NULL OR move_type NOT IN ('in_invoice', 'in_refund', 'in_receipt')))",
"Another entry with the same name already exists.",
)
_unique_name_latam = models.UniqueIndex(
"(name, commercial_partner_id, l10n_latam_document_type_id, company_id)"
" WHERE (state = 'posted' AND name != '/'"
" AND (l10n_latam_document_type_id IS NOT NULL AND move_type IN ('in_invoice', 'in_refund', 'in_receipt')))",
"Another entry with the same name already exists.",
)
def _auto_init(self):
# Skip the computation of the field `l10n_latam_document_type_id` at the module installation
# Without this, at the module installation,
@ -45,12 +57,11 @@ class AccountMove(models.Model):
l10n_latam_available_document_type_ids = fields.Many2many('l10n_latam.document.type', compute='_compute_l10n_latam_available_document_types')
l10n_latam_document_type_id = fields.Many2one(
'l10n_latam.document.type', string='Document Type', readonly=False, auto_join=True, index='btree_not_null',
states={'posted': [('readonly', True)]}, compute='_compute_l10n_latam_document_type', store=True)
'l10n_latam.document.type', string='Document Type', readonly=False, bypass_search_access=True, index='btree_not_null', compute='_compute_l10n_latam_document_type', store=True)
l10n_latam_document_number = fields.Char(
compute='_compute_l10n_latam_document_number', inverse='_inverse_l10n_latam_document_number',
string='Document Number', readonly=True, states={'draft': [('readonly', False)]})
l10n_latam_use_documents = fields.Boolean(related='journal_id.l10n_latam_use_documents')
string='Document Number', readonly=False)
l10n_latam_use_documents = fields.Boolean(compute='_compute_l10n_latam_use_documents', search='_search_l10n_latam_use_documents')
l10n_latam_manual_document_number = fields.Boolean(compute='_compute_l10n_latam_manual_document_number', string='Manual Number')
l10n_latam_document_type_id_code = fields.Char(related='l10n_latam_document_type_id.code', string='Doc Type')
@ -58,13 +69,13 @@ class AccountMove(models.Model):
def _compute_name(self):
""" Change the way that the use_document moves name is computed:
* If move use document but does not have document type selected then name = '/' to do not show the name.
* If move use document but does not have document type selected then name = 'False' to do not show the name.
* If move use document and are numbered manually do not compute name at all (will be set manually)
* If move use document and is in draft state and has not been posted before we restart name to '/' (this is
* If move use document and is in draft state and has not been posted before we restart name to False (this is
when we change the document type) """
without_doc_type = self.filtered(lambda x: x.journal_id.l10n_latam_use_documents and not x.l10n_latam_document_type_id)
manual_documents = self.filtered(lambda x: x.journal_id.l10n_latam_use_documents and x.l10n_latam_manual_document_number)
(without_doc_type + manual_documents.filtered(lambda x: not x.name)).name = '/'
without_doc_type = self.filtered(lambda x: x.l10n_latam_use_documents and not x.l10n_latam_document_type_id)
manual_documents = self.filtered(lambda x: x.l10n_latam_use_documents and x.l10n_latam_manual_document_number)
(without_doc_type + manual_documents.filtered(lambda x: not x.name)).name = False
# we need to group moves by document type as _compute_name will apply the same name prefix of the first record to the others
group_by_document_type = defaultdict(self.env['account.move'].browse)
for move in (self - without_doc_type - manual_documents):
@ -72,10 +83,16 @@ class AccountMove(models.Model):
for group in group_by_document_type.values():
super(AccountMove, group)._compute_name()
def _compute_name_placeholder(self):
use_documents_moves = self.filtered(lambda m: m.l10n_latam_use_documents)
use_documents_moves.name_placeholder = False
if other_moves := self - use_documents_moves:
super(AccountMove, other_moves)._compute_name_placeholder()
@api.depends('l10n_latam_document_type_id', 'journal_id')
def _compute_l10n_latam_manual_document_number(self):
""" Indicates if this document type uses a sequence or if the numbering is made manually """
recs_with_journal_id = self.filtered(lambda x: x.journal_id and x.journal_id.l10n_latam_use_documents)
recs_with_journal_id = self.filtered(lambda x: x.journal_id and x.l10n_latam_use_documents)
for rec in recs_with_journal_id:
rec.l10n_latam_manual_document_number = rec._is_manual_document_number()
remaining = self - recs_with_journal_id
@ -84,9 +101,14 @@ class AccountMove(models.Model):
def _is_manual_document_number(self):
return self.journal_id.type == 'purchase'
@api.depends('journal_id')
def _compute_l10n_latam_use_documents(self):
for rec in self:
rec.l10n_latam_use_documents = rec.journal_id.l10n_latam_use_documents and rec.move_type != 'in_receipt'
@api.depends('name')
def _compute_l10n_latam_document_number(self):
recs_with_name = self.filtered(lambda x: x.name != '/')
recs_with_name = self.filtered(lambda x: x.name and x.name != "/")
for rec in recs_with_name:
name = rec.name
doc_code_prefix = rec.l10n_latam_document_type_id.doc_code_prefix
@ -100,7 +122,7 @@ class AccountMove(models.Model):
def _inverse_l10n_latam_document_number(self):
for rec in self.filtered(lambda x: x.l10n_latam_document_type_id):
if not rec.l10n_latam_document_number:
rec.name = '/'
rec.name = False
else:
l10n_latam_document_number = rec.l10n_latam_document_number
if not rec._skip_format_document_number():
@ -112,9 +134,9 @@ class AccountMove(models.Model):
@api.onchange('l10n_latam_document_type_id')
def _onchange_l10n_latam_document_type_id(self):
# if we change document or journal and we are in draft and not posted, we clean number so that is recomputed
if (self.journal_id.l10n_latam_use_documents and self.l10n_latam_document_type_id
if (self.l10n_latam_use_documents and self.l10n_latam_document_type_id
and not self.l10n_latam_manual_document_number and self.state == 'draft' and not self.posted_before):
self.name = '/'
self.name = False
self._compute_name()
@api.depends('journal_id', 'l10n_latam_document_type_id')
@ -129,13 +151,20 @@ class AccountMove(models.Model):
return 'never'
return super(AccountMove, self)._deduce_sequence_number_reset(name)
def _get_last_sequence_domain(self, relaxed=False):
no_anti_regex = False
if self.l10n_latam_use_documents:
no_anti_regex = True
where_string, param = super(AccountMove, self.with_context(no_anti_regex=no_anti_regex))._get_last_sequence_domain(relaxed)
return where_string, param
def _skip_format_document_number(self):
"""Hook to be overridden in localisation"""
self.ensure_one()
return False
def _get_starting_sequence(self):
if self.journal_id.l10n_latam_use_documents:
if self.l10n_latam_use_documents:
if self.l10n_latam_document_type_id:
return "%s 00000000" % (self.l10n_latam_document_type_id.doc_code_prefix)
# There was no pattern found, propose one
@ -149,13 +178,6 @@ class AccountMove(models.Model):
raise UserError(_('We do not accept the usage of document types on receipts yet. '))
return super()._post(soft)
@api.constrains('name', 'journal_id', 'state')
def _check_unique_sequence_number(self):
""" This uniqueness verification is only valid for customer invoices, and vendor bills that does not use
documents. A new constraint method _check_unique_vendor_number has been created just for validate for this purpose """
vendor = self.filtered(lambda x: x.is_purchase_document() and x.l10n_latam_use_documents)
return super(AccountMove, self - vendor)._check_unique_sequence_number()
@api.constrains('state', 'l10n_latam_document_type_id')
def _check_l10n_latam_documents(self):
""" This constraint checks that if a invoice is posted and does not have a document type configured will raise
@ -189,54 +211,43 @@ class AccountMove(models.Model):
def _get_l10n_latam_documents_domain(self):
self.ensure_one()
if self.move_type in ['out_refund', 'in_refund']:
internal_types = []
invoice_type = self.move_type
if invoice_type in ['out_refund', 'in_refund']:
internal_types = ['credit_note']
else:
elif invoice_type in ['out_invoice', 'in_invoice']:
internal_types = ['invoice', 'debit_note']
if self.debit_origin_id:
internal_types = ['debit_note']
internal_types += ['all']
return [('internal_type', 'in', internal_types), ('country_id', '=', self.company_id.account_fiscal_country_id.id)]
@api.depends('journal_id', 'partner_id', 'company_id', 'move_type')
@api.depends('journal_id', 'partner_id', 'company_id', 'move_type', 'debit_origin_id')
def _compute_l10n_latam_available_document_types(self):
self.l10n_latam_available_document_type_ids = False
for rec in self.filtered(lambda x: x.journal_id and x.l10n_latam_use_documents and x.partner_id):
rec.l10n_latam_available_document_type_ids = self.env['l10n_latam.document.type'].search(rec._get_l10n_latam_documents_domain())
@api.depends('l10n_latam_available_document_type_ids', 'debit_origin_id')
@api.depends('l10n_latam_available_document_type_ids')
def _compute_l10n_latam_document_type(self):
for rec in self.filtered(lambda x: x.state == 'draft' and (not x.posted_before if x.move_type in ['out_invoice', 'out_refund'] else True)):
document_types = rec.l10n_latam_available_document_type_ids._origin
invoice_type = rec.move_type
if invoice_type in ['out_refund', 'in_refund']:
document_types = document_types.filtered(lambda x: x.internal_type not in ['debit_note', 'invoice'])
elif invoice_type in ['out_invoice', 'in_invoice']:
document_types = document_types.filtered(lambda x: x.internal_type not in ['credit_note'])
if rec.debit_origin_id:
document_types = document_types.filtered(lambda x: x.internal_type == 'debit_note')
if rec.l10n_latam_document_type_id not in document_types:
rec.l10n_latam_document_type_id = document_types and document_types[0].id
@api.constrains('name', 'partner_id', 'company_id', 'posted_before')
def _check_unique_vendor_number(self):
""" The constraint _check_unique_sequence_number is valid for customer bills but not valid for us on vendor
bills because the uniqueness must be per partner """
for rec in self.filtered(
lambda x: x.name and x.name != '/' and x.is_purchase_document() and x.l10n_latam_use_documents
and x.commercial_partner_id):
domain = [
('move_type', '=', rec.move_type),
# by validating name we validate l10n_latam_document_type_id
('name', '=', rec.name),
('company_id', '=', rec.company_id.id),
('id', '!=', rec.id),
('commercial_partner_id', '=', rec.commercial_partner_id.id),
# allow to have to equal if they are cancelled
('state', '!=', 'cancel'),
]
if rec.search(domain):
raise ValidationError(_('Vendor bill number must be unique per vendor and company.'))
def _compute_made_sequence_gap(self):
use_documents_moves = self.filtered(lambda m: m.l10n_latam_use_documents)
use_documents_moves.made_sequence_gap = False
if other_moves := self - use_documents_moves:
super(AccountMove, other_moves)._compute_made_sequence_gap()
def _compute_made_sequence_hole(self):
manual_documents = self.filtered(lambda x: x.journal_id.l10n_latam_use_documents and x.l10n_latam_manual_document_number)
manual_documents.made_sequence_hole = False
super(AccountMove, self - manual_documents)._compute_made_sequence_hole()
def _set_next_made_sequence_gap(self, made_gap: bool):
if other_moves := self.filtered(lambda m: not m.l10n_latam_use_documents):
super(AccountMove, other_moves)._set_next_made_sequence_gap(made_gap)
def _search_l10n_latam_use_documents(self, operator, value):
if operator not in ('=', '!='):
return NotImplemented
return [('journal_id.l10n_latam_use_documents', operator, value), ('move_type', '!=', 'in_receipt')]

View file

@ -5,7 +5,6 @@ from odoo.tools.sql import column_exists, create_column
class AccountMoveLine(models.Model):
_inherit = 'account.move.line'
def _auto_init(self):
@ -16,4 +15,5 @@ class AccountMoveLine(models.Model):
return super()._auto_init()
l10n_latam_document_type_id = fields.Many2one(
related='move_id.l10n_latam_document_type_id', auto_join=True, store=True, index='btree_not_null')
related='move_id.l10n_latam_document_type_id', bypass_search_access=True, store=True, index='btree_not_null')
l10n_latam_use_documents = fields.Boolean(related='move_id.l10n_latam_use_documents')

View file

@ -1,11 +1,10 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models, api
from odoo.osv import expression
class L10nLatamDocumentType(models.Model):
class L10n_LatamDocumentType(models.Model):
_name = 'l10n_latam.document.type'
_description = 'Latam Document Type'
_order = 'sequence, id'
_rec_names_search = ['name', 'code']
@ -16,14 +15,14 @@ class L10nLatamDocumentType(models.Model):
' commonly used first')
country_id = fields.Many2one(
'res.country', required=True, index=True, help='Country in which this type of document is valid')
name = fields.Char(required=True, help='The document name')
name = fields.Char(required=True, help='The document name', translate=True)
doc_code_prefix = fields.Char(
'Document Code Prefix', help="Prefix for Documents Codes on Invoices and Account Moves. For eg. 'FA ' will"
" build 'FA 0001-0000001' Document Number")
code = fields.Char(help='Code used by different localizations')
report_name = fields.Char('Name on Reports', help='Name that will be printed in reports, for example "CREDIT NOTE"')
report_name = fields.Char('Name on Reports', help='Name that will be printed in reports, for example "CREDIT NOTE"', translate=True)
internal_type = fields.Selection(
[('invoice', 'Invoices'), ('debit_note', 'Debit Notes'), ('credit_note', 'Credit Notes')],
[('invoice', 'Invoices'), ('debit_note', 'Debit Notes'), ('credit_note', 'Credit Notes'), ('all', 'All Documents')],
help='Analog to odoo account.move.move_type but with more options allowing to identify the kind of document we are'
' working with. (not only related to account.move, could be for documents of other models like stock.picking)')
@ -35,11 +34,10 @@ class L10nLatamDocumentType(models.Model):
self.ensure_one()
return document_number
def name_get(self):
result = []
@api.depends('code')
def _compute_display_name(self):
for rec in self:
name = rec.name
if rec.code:
name = '(%s) %s' % (rec.code, name)
result.append((rec.id, name))
return result
name = f'({rec.code}) {name}'
rec.display_name = name

View file

@ -3,7 +3,6 @@ from odoo import fields, models
class ResCompany(models.Model):
_inherit = "res.company"
def _localization_use_documents(self):

View file

@ -1,13 +1,14 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, fields
from odoo.tools import SQL
class AccountInvoiceReport(models.Model):
_inherit = 'account.invoice.report'
l10n_latam_document_type_id = fields.Many2one('l10n_latam.document.type', 'Document Type', index=True)
_depends = {'account.move': ['l10n_latam_document_type_id'],}
def _select(self):
return super()._select() + ", move.l10n_latam_document_type_id as l10n_latam_document_type_id"
def _select(self) -> SQL:
return SQL("%s, move.l10n_latam_document_type_id as l10n_latam_document_type_id",
super()._select())

View file

@ -1,3 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_l10n_latam_document_type_all,l10n_latam.document.type.all,model_l10n_latam_document_type,,1,0,0,0
access_l10n_latam_document_type,access_l10n_latam_document_type,model_l10n_latam_document_type,base.group_user,1,0,0,0
access_l10n_latam_document_type_account_manager,l10n_latam.document.type.all,model_l10n_latam_document_type,account.group_account_manager,1,1,1,0

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_l10n_latam_document_type_all access_l10n_latam_document_type l10n_latam.document.type.all access_l10n_latam_document_type model_l10n_latam_document_type base.group_user 1 0 0 0
3 access_l10n_latam_document_type_account_manager l10n_latam.document.type.all model_l10n_latam_document_type account.group_account_manager 1 1 1 0

View file

@ -11,7 +11,7 @@
<field name="l10n_latam_company_use_documents" invisible="1"/>
</form>
<field name="type" position="after">
<field name="l10n_latam_use_documents" attrs="{'invisible': ['|', ('l10n_latam_company_use_documents', '=', False), ('type', 'not in', ['purchase','sale'])]}"/>
<field name="l10n_latam_use_documents" invisible="not l10n_latam_company_use_documents or type not in ['purchase', 'sale']"/>
</field>
</field>
</record>

View file

@ -42,18 +42,19 @@
<xpath expr="//div[@name='journal_div']" position="after">
<field name="l10n_latam_document_type_id"
attrs="{'invisible': [('l10n_latam_use_documents', '=', False)], 'required': [('partner_id', '!=', False), ('l10n_latam_use_documents', '=', True)], 'readonly': [('posted_before', '=', True)]}"
invisible="not l10n_latam_use_documents"
readonly="posted_before"
required="partner_id and l10n_latam_use_documents"
domain="[('id', 'in', l10n_latam_available_document_type_ids)]" options="{'no_open': True, 'no_create': True}"/>
<field name="l10n_latam_document_number"
attrs="{'invisible': ['|', ('l10n_latam_use_documents', '=', False), ('l10n_latam_manual_document_number', '=', False), '|', '|', ('l10n_latam_use_documents', '=', False), ('highest_name', '!=', False), ('state', '!=', 'draft')],
'required': [('partner_id', '!=', False), ('l10n_latam_use_documents', '=', True), '|', ('l10n_latam_manual_document_number', '=', True), ('highest_name', '=', False)],
'readonly': [('posted_before', '=', True), ('state', '!=', 'draft')]}"/>
invisible="(not l10n_latam_use_documents or not l10n_latam_manual_document_number) and (not l10n_latam_use_documents or highest_name or state != 'draft')"
readonly="posted_before and state != 'draft'"
required="partner_id and l10n_latam_use_documents and l10n_latam_manual_document_number"/>
</xpath>
<!-- on latam_documents we use document_number to set name -->
<field name="name" position="attributes">
<attribute name="attrs">{'invisible':[('name', '=', '/'), ('posted_before', '=', False), ('quick_edit_mode', '=', False)],
'readonly': ['|', ('state', '!=', 'draft'), ('l10n_latam_use_documents', '=', True)]}</attribute>
<attribute name="readonly">state != 'draft' or l10n_latam_use_documents</attribute>
<attribute name="force_save">1</attribute>
</field>

View file

@ -19,10 +19,10 @@
</record>
<record id="view_document_type_tree" model="ir.ui.view">
<field name="name">l10n_latam.document.type.tree</field>
<field name="name">l10n_latam.document.type.list</field>
<field name="model">l10n_latam.document.type</field>
<field name="arch" type="xml">
<tree string="Document Type" decoration-muted="(not active)" create="0" edit="0">
<list string="Document Type" decoration-muted="(not active)" create="0" edit="0">
<field name="code"/>
<field name="name"/>
<field name="doc_code_prefix"/>
@ -30,7 +30,7 @@
<field name='internal_type'/>
<field name='country_id'/>
<field name="active" widget="boolean_toggle"/>
</tree>
</list>
</field>
</record>
@ -45,7 +45,7 @@
<field name='country_id'/>
<filter name="active" string="Active" domain="[('active','=',True)]" help="Show active document types"/>
<filter name="inactive" string="Archived" domain="[('active','=',False)]" help="Show archived document types"/>
<group expand="1" string="Group By...">
<group>
<filter string="Internal Type" name="group_by_internal_type" context="{'group_by':'internal_type'}"/>
<filter string="Localization" name="group_by_localization" context="{'group_by':'country_id'}"/>
</group>

View file

@ -3,22 +3,24 @@
<template id="external_layout_standard" inherit_id="web.external_layout_standard" >
<!-- support for custom header -->
<div t-attf-class="header o_company_#{company.id}_layout" position="attributes">
<xpath expr="//img/../.." position="attributes">
<attribute name="t-if">not custom_header</attribute>
</div>
<div t-attf-class="header o_company_#{company.id}_layout" position="after">
<div t-attf-class="header o_company_#{company.id}_layout" t-if="custom_header">
</xpath>
<xpath expr="//img/../.." position="after">
<div t-attf-class="header o_company_#{company.id}_layout"
t-if="custom_header and company._localization_use_documents()">
<t t-call="#{custom_header}"/>
</div>
</div>
</xpath>
<!-- support for custom footer -->
<div t-attf-class="footer o_standard_footer o_company_#{company.id}_layout" position="attributes">
<div class="o_footer_content d-flex border-top pt-2" position="attributes">
<attribute name="t-if">not custom_footer</attribute>
</div>
<div t-attf-class="footer o_standard_footer o_company_#{company.id}_layout" position="after">
<div t-attf-class="footer o_standard_footer o_company_#{company.id}_layout" t-if="custom_footer">
<div class="o_footer_content d-flex border-top pt-2" position="after">
<div class="o_footer_content border-top pt-2"
t-if="custom_footer and company._localization_use_documents()">
<t t-out="custom_footer"/>
</div>
</div>
@ -26,74 +28,139 @@
<template id="external_layout_bold" inherit_id="web.external_layout_bold" >
<!-- support for custom header -->
<div t-attf-class="header o_company_#{company.id}_layout" position="attributes">
<xpath expr="//img/../.." position="attributes">
<attribute name="t-if">not custom_header</attribute>
</div>
<div t-attf-class="header o_company_#{company.id}_layout" position="after">
<div t-attf-class="header o_company_#{company.id}_layout" t-if="custom_header">
<div class="o_clean_header">
<t t-call="#{custom_header}"/>
</div>
</xpath>
<xpath expr="//img/../.." position="after">
<div t-if="custom_header and company._localization_use_documents()">
<t t-call="#{custom_header}"/>
</div>
</div>
</xpath>
<!-- support for custom footer -->
<div t-attf-class="footer o_clean_footer o_company_#{company.id}_layout" position="attributes">
<xpath expr="//div[hasclass('o_footer_content')]" position="attributes">
<attribute name="t-if">not custom_footer</attribute>
</div>
<div t-attf-class="footer o_clean_footer o_company_#{company.id}_layout" position="after">
<div t-attf-class="footer o_clean_footer o_company_#{company.id}_layout" t-if="custom_footer">
</xpath>
<xpath expr="//div[hasclass('o_footer_content')]" position="after">
<div class="o_footer_content border-top pt-2" t-attf-class="{{'d-flex' if is_html_empty(company.report_header) else 'row' }}"
t-if="custom_footer and company._localization_use_documents()">
<t t-out="custom_footer"/>
</div>
</div>
</xpath>
</template>
<template id="external_layout_boxed" inherit_id="web.external_layout_boxed" >
<!-- support for custom header -->
<div t-attf-class="header o_company_#{company.id}_layout" position="attributes">
<xpath expr="//img/../.." position="attributes">
<attribute name="t-if">not custom_header</attribute>
</div>
<div t-attf-class="header o_company_#{company.id}_layout" position="after">
<div t-attf-class="header o_company_#{company.id}_layout" t-if="custom_header">
<div class="o_boxed_header">
<t t-call="#{custom_header}"/>
</div>
</xpath>
<xpath expr="//img/../.." position="after">
<div t-if="custom_header and company._localization_use_documents()">
<t t-call="#{custom_header}"/>
</div>
</div>
</xpath>
<!-- support for custom footer -->
<div t-attf-class="footer o_boxed_footer o_company_#{company.id}_layout" position="attributes">
<xpath expr="//div[hasclass('o_footer_content')]" position="attributes">
<attribute name="t-if">not custom_footer</attribute>
</div>
<div t-attf-class="footer o_boxed_footer o_company_#{company.id}_layout" position="after">
<div t-attf-class="footer o_boxed_footer o_company_#{company.id}_layout" t-if="custom_footer">
</xpath>
<xpath expr="//div[hasclass('o_footer_content')]" position="after">
<div class="o_footer_content border-top pt-2" t-attf-class="{{'d-flex' if is_html_empty(company.report_header) else 'row' }}"
t-if="custom_footer and company._localization_use_documents()">
<t t-out="custom_footer"/>
</div>
</div>
</xpath>
</template>
<template id="external_layout_striped" inherit_id="web.external_layout_striped" >
<!-- support for custom header -->
<div t-attf-class="o_company_#{company.id}_layout header" position="attributes">
<xpath expr="//img/../.." position="attributes">
<attribute name="t-if">not custom_header</attribute>
</div>
<div t-attf-class="o_company_#{company.id}_layout header" position="after">
<div t-attf-class="o_company_#{company.id}_layout header" t-if="custom_header">
<div class="o_background_header">
<t t-call="#{custom_header}"/>
</div>
</xpath>
<xpath expr="//img/../.." position="after">
<div t-if="custom_header and company._localization_use_documents()">
<t t-call="#{custom_header}"/>
</div>
</div>
</xpath>
<!-- support for custom footer -->
<div t-attf-class="o_company_#{company.id}_layout footer o_background_footer" position="attributes">
<div class="o_footer_content border-top pt-2 text-center" position="attributes">
<attribute name="t-if">not custom_footer</attribute>
</div>
<div t-attf-class="o_company_#{company.id}_layout footer o_background_footer" position="after">
<div t-attf-class="o_company_#{company.id}_layout footer o_background_footer" t-if="custom_footer">
<div class="o_footer_content border-top pt-2 text-center" position="after">
<div class="o_footer_content border-top pt-2 text-center"
t-if="custom_footer and company._localization_use_documents()">
<t t-out="custom_footer"/>
</div>
</div>
</template>
<template id="external_layout_bubble" inherit_id="web.external_layout_bubble">
<!-- support for custom header -->
<xpath expr="//img/../.." position="attributes">
<attribute name="t-if">not custom_header</attribute>
</xpath>
<xpath expr="//img/../.." position="after">
<div t-if="custom_header and company._localization_use_documents()">
<t t-call="#{custom_header}"/>
</div>
</xpath>
<!-- support for custom footer -->
<div t-attf-class="o_footer_content {{report_type != 'pdf' and 'position-absolute end-0 start-0 bottom-0 mx-5'}} pt-4 text-center" position="attributes">
<attribute name="t-if">not custom_footer</attribute>
</div>
<div t-attf-class="o_footer_content {{report_type != 'pdf' and 'position-absolute end-0 start-0 bottom-0 mx-5'}} pt-4 text-center" position="after">
<div t-attf-class="o_footer_content {{report_type != 'pdf' and 'position-absolute end-0 start-0 bottom-0 mx-5'}} pt-4 text-center"
t-if="custom_footer and company._localization_use_documents()">
<t t-out="custom_footer"/>
</div>
</div>
</template>
<template id="external_layout_wave" inherit_id="web.external_layout_wave">
<!-- support for custom header -->
<xpath expr="//img/../.." position="attributes">
<attribute name="t-if">not custom_header</attribute>
</xpath>
<xpath expr="//img/../.." position="after">
<div t-if="custom_header and company._localization_use_documents()">
<t t-call="#{custom_header}"/>
</div>
</xpath>
<!-- support for custom footer -->
<xpath expr="//div[contains(@t-attf-class,'o_footer_content')]" position="attributes">
<attribute name="t-if">not custom_footer</attribute>
</xpath>
<xpath expr="//div[contains(@t-attf-class,'o_footer_content')]" position="after">
<div t-attf-class="o_footer_content {{report_type != 'pdf' and 'mx-5'}} pt-5 text-center"
t-if="custom_footer and company._localization_use_documents()">
<t t-out="custom_footer"/>
</div>
</xpath>
</template>
<template id="external_layout_folder" inherit_id="web.external_layout_folder">
<!-- support for custom header -->
<xpath expr="//img/../.." position="attributes">
<attribute name="t-if">not custom_header</attribute>
</xpath>
<xpath expr="//img/../.." position="after">
<div t-if="custom_header and company._localization_use_documents()">
<t t-call="#{custom_header}"/>
</div>
</xpath>
<!-- support for custom footer -->
<div class="o_footer_content d-flex border-top pt-2" position="attributes">
<attribute name="t-if">not custom_footer</attribute>
</div>
<div class="o_footer_content d-flex border-top pt-2" position="after">
<div class="o_footer_content border-top pt-2"
t-if="custom_footer and company._localization_use_documents()">
<t t-out="custom_footer"/>
</div>
</div>
</template>
</odoo>

View file

@ -2,7 +2,6 @@ from odoo import models
class AccountDebitNote(models.TransientModel):
_inherit = 'account.debit.note'
def create_debit(self):
@ -14,3 +13,9 @@ class AccountDebitNote(models.TransientModel):
new_move._compute_l10n_latam_document_type()
new_move._onchange_l10n_latam_document_type_id()
return res
def _prepare_default_values(self, move):
""" Needed to avoid constraint when creating Debit Note from Credit Note """
vals = super()._prepare_default_values(move)
vals['l10n_latam_document_type_id'] = False
return vals

View file

@ -13,16 +13,21 @@ class AccountMoveReversal(models.TransientModel):
l10n_latam_document_number = fields.Char(string='Document Number')
l10n_latam_manual_document_number = fields.Boolean(compute='_compute_l10n_latam_manual_document_number', string='Manual Number')
@api.depends('l10n_latam_document_type_id')
@api.depends('l10n_latam_document_type_id', 'journal_id')
def _compute_l10n_latam_manual_document_number(self):
self.l10n_latam_manual_document_number = False
for rec in self.filtered('move_ids'):
move = rec.move_ids[0]
if move.journal_id and move.journal_id.l10n_latam_use_documents:
rec.l10n_latam_manual_document_number = move._is_manual_document_number()
for wiz in self.filtered(lambda x: x.journal_id and x.journal_id.l10n_latam_use_documents):
wiz.l10n_latam_manual_document_number = self.env['account.move'].new({
'move_type': wiz._reverse_type_map(wiz.move_ids[0].move_type),
'journal_id': wiz.journal_id.id,
'partner_id': wiz.move_ids[0].partner_id.id,
'company_id': wiz.move_ids[0].company_id.id,
'reversed_entry_id': wiz.move_ids[0].id,
})._is_manual_document_number()
@api.model
def _reverse_type_map(self, move_type):
self.ensure_one()
match = {
'entry': 'entry',
'out_invoice': 'out_refund',
@ -32,7 +37,7 @@ class AccountMoveReversal(models.TransientModel):
'in_receipt': 'out_receipt'}
return match.get(move_type)
@api.depends('l10n_latam_available_document_type_ids')
@api.depends('l10n_latam_available_document_type_ids', 'journal_id')
def _compute_document_type(self):
for record in self.filtered(
lambda x: not x.l10n_latam_document_type_id or
@ -48,9 +53,9 @@ class AccountMoveReversal(models.TransientModel):
if len(record.move_ids) > 1:
move_ids_use_document = record.move_ids._origin.filtered(lambda move: move.l10n_latam_use_documents)
if move_ids_use_document:
raise UserError(_('You can only reverse documents with legal invoicing documents from Latin America one at a time.\nProblematic documents: %s') % ", ".join(move_ids_use_document.mapped('name')))
raise UserError(_('You can only reverse documents with legal invoicing documents from Latin America one at a time.\nProblematic documents: %s', ", ".join(move_ids_use_document.mapped('name'))))
else:
record.l10n_latam_use_documents = record.move_ids.journal_id.l10n_latam_use_documents
record.l10n_latam_use_documents = record.journal_id.l10n_latam_use_documents
if record.l10n_latam_use_documents:
refund = record.env['account.move'].new({
@ -58,6 +63,7 @@ class AccountMoveReversal(models.TransientModel):
'journal_id': record.journal_id.id,
'partner_id': record.move_ids.partner_id.id,
'company_id': record.move_ids.company_id.id,
'reversed_entry_id': record.move_ids.id,
})
record.l10n_latam_available_document_type_ids = refund.l10n_latam_available_document_type_ids

View file

@ -12,8 +12,8 @@
</form>
<field name="date" position="before">
<field name="l10n_latam_available_document_type_ids" invisible="1"/>
<field name="l10n_latam_document_type_id" attrs="{'invisible': ['|', ('l10n_latam_use_documents', '=', False), ('refund_method', '=', 'refund')], 'required': [('l10n_latam_use_documents', '=', True), ('refund_method', '!=', 'refund')]}" options="{'no_open': True, 'no_create': True}"/>
<field name="l10n_latam_document_number" attrs="{'invisible': ['|', '|', ('l10n_latam_use_documents', '=', False), ('l10n_latam_manual_document_number', '=', False), ('refund_method', '=', 'refund')], 'required': [('l10n_latam_manual_document_number', '=', True), ('l10n_latam_use_documents', '=', True), ('refund_method', '!=', 'refund')]}"/>
<field name="l10n_latam_document_type_id" invisible="not l10n_latam_use_documents" required="l10n_latam_use_documents" options="{'no_open': True, 'no_create': True}"/>
<field name="l10n_latam_document_number" invisible="not l10n_latam_use_documents or not l10n_latam_manual_document_number" required="l10n_latam_manual_document_number and l10n_latam_use_documents"/>
</field>
</field>
</record>

View file

@ -1,13 +1,15 @@
[project]
name = "odoo-bringout-oca-ocb-l10n_latam_invoice_document"
version = "16.0.0"
description = "LATAM Document - LATAM Document Types"
description = "LATAM Document -
LATAM Document Types
"
authors = [
{ name = "Ernad Husremovic", email = "hernad@bring.out.ba" }
]
dependencies = [
"odoo-bringout-oca-ocb-account>=16.0.0",
"odoo-bringout-oca-ocb-account_debit_note>=16.0.0",
"odoo-bringout-oca-ocb-account>=19.0.0",
"odoo-bringout-oca-ocb-account_debit_note>=19.0.0",
"requests>=2.25.1"
]
readme = "README.md"
@ -17,7 +19,7 @@ classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Office/Business",
]