@@ -5,14 +5,24 @@ Colombia
5
5
.. |DIAN | replace :: :abbr: `DIAN ( Dirección de Impuestos y Aduanas Nacionales ) `
6
6
7
7
Odoo's Colombian localization package provides accounting, fiscal, and legal features for databases
8
- in Colombia – such as chart of accounts, taxes, and electronic invoicing.
9
-
10
- In addition, a series of videos on the subject is also available. These videos cover how to start
11
- from scratch, set up configurations, complete common workflows, and provide in-depth looks at some
12
- specific use cases as well.
8
+ in Colombia – such as chart of accounts, taxes, and electronic invoicing.The localization has the
9
+ next `prerequisites <https://micrositios.dian.gov.co/sistema-de-facturacion-electronica/que-requieres
10
+ -para-factura-electronicamente/> `_ when using the `DIAN Own Software <hhttps://micrositios.dian.gov.
11
+ co/sistema-de-facturacion-electronica/como-puedes-facturar-electronicamente/> `_ solution with Odoo:
12
+
13
+ - Be registered in the `RUT <https://www.dian.gov.co/tramitesservicios/tramites-y-servicios/tributarios
14
+ /Paginas/RUT.aspx> `_ (Registro Único Tributario) with a valid NIT.
15
+ - Have a valid Digital Signature Certificate `approved by the ONAC <https://onac.org.co/directorio-de-
16
+ acreditados/> `_.
17
+ -`Register and get enabled <https://micrositios.dian.gov.co/sistema-de-facturacion-electronica/proceso
18
+ -de-registro-y-habilitacion-como-facturador-electronico/> `_ by completing the Certification Process
19
+ required by the DIAN.
13
20
14
21
.. seealso ::
15
- `Smart Tutorial - Colombian Localization
22
+ - For more information on how to complete the Certification process for the DIAN module, review the
23
+ following `Webinar <https://micrositios.dian.gov.co/sistema-de-facturacion-electronica/proceso
24
+ -de-registro-y-habilitacion-como-facturador-electronico/> `_.
25
+ - `Smart Tutorial - Colombian Localization
16
26
<https://www.odoo.com/slides/smart-tutorial-localizacion-de-colombia-132> `_.
17
27
18
28
.. _colombia/configuration :
@@ -38,17 +48,17 @@ localization:
38
48
- Default :ref: `fiscal localization package <fiscal_localizations/packages >`. This module adds
39
49
the base accounting features for the Colombian localization: chart of accounts, taxes,
40
50
withholdings, and identification document type.
51
+ * - :guilabel: `Electronic invoicing for Colombia with DIAN `
52
+ - `l10n_co_dian `
53
+ - This module includes the features required for integration with the DIAN as an own software, Adds
54
+ the ability to generate electronic invoices and support documents based on |DIAN | regulations.
41
55
* - :guilabel: `Colombian - Accounting Reports `
42
56
- `l10n_co_reports `
43
57
- Includes accounting reports for sending certifications to suppliers for withholdings applied.
44
58
* - :guilabel: `Electronic invoicing for Colombia with Carvajal `
45
59
- `l10n_co_edi `
46
- - This module includes the features required for integration with Carvajal, and
47
- generates the electronic invoices and support documents related to the vendor bills, based on
48
- |DIAN | regulations.
49
- * - :guilabel: `Colombian - Point of Sale `
50
- - `l10n_co_pos `
51
- - Includes Point of Sale receipts for Colombian localization.
60
+ - This module includes the features required for integration with Carvajal. Adds the ability to
61
+ generate the electronic invoices and support documents, based on |DIAN | regulations.
52
62
53
63
.. note ::
54
64
When `Colombia ` is selected for a company's :guilabel: `Fiscal Localization `, Odoo automatically
@@ -83,33 +93,54 @@ Next, configure the :guilabel:`Fiscal Information` in the :guilabel:`Sales & Pur
83
93
- :guilabel: `Commercial Name `: If the company uses a specific commercial name, and it needs to be
84
94
displayed in the invoice.
85
95
86
- Carjaval credentials configuration
87
- ----------------------------------
96
+ Electronic Invoice Credentials configuration
97
+ --------------------------------------------
88
98
89
99
Once the modules are installed, the user credentials **must ** be configured, in order to connect
90
- with Carvajal Web Service. To do so, navigate to :menuselection: `Accounting --> Configuration -->
100
+ with DIAN’s Web Service. To do so, navigate to :menuselection: `Accounting --> Configuration -->
91
101
Settings ` and scroll to the :guilabel: `Colombian Electronic Invoicing ` section. Then, fill in the
92
- required configuration information provided by Carvajal:
102
+ required configuration:
103
+
104
+ - Select :guilabel: `DIAN: Free Service ` as the :guilabel: `Electronic Invoicing Provider `
105
+ - Configure the :guilabel: `Operation Mode(s) `: for the respective type(s) of document(s) to be
106
+ generated from Odoo. For each type of document (Electronic Invoices or Support Documents) the next
107
+ fields are required:
108
+ #. :guilabel: `Software Mode `: Type of document to be generated with the operation mode.
109
+ #. :guilabel: `Software ID `: ID generated by DIAN for the specific operation mode.
110
+ #. :guilabel: `Software PIN `: PIN selected in the operation mode configuration in the DIAN portal
111
+ #. :guilabel: `Testing ID `: Testing identification generated by DIAN and obtained from the testing
112
+ set of the operation mode
113
+ - Enter your available **digital certificate ** to sign your electronic documents:
114
+ #. Both **Certificate ** and **Certificate Key ** must be in PEM format.
115
+
116
+ .. image :: colombia/dian-credentials-configuration.png
117
+ :align: center
118
+ :alt: Colombian Electronic Invoicing credentials configured
119
+
120
+ .. note ::
121
+ In a multi-company database it is possible to have one certificate per company.
93
122
94
- - :guilabel: `Username ` and :guilabel: `Password `: Username and password (provided by Carvajal) to the
95
- company.
96
- - :guilabel: `Company Registry `: Company's NIT number *without * the verification code.
97
- - :guilabel: `Account ID `: Company's NIT number followed by `_01 `.
98
- - :guilabel: `Colombia Template Code `: Select one of the two available templates (`CGEN03 ` or
99
- `CGNE04 `) to be used in the PDF format of the electronic invoice.
123
+ DIAN Environments Configuration
124
+ -------------------------------
100
125
101
- Enable the :guilabel: ` Test mode ` checkbox to connect with the Carvajal testing environment.
126
+ The DIAN Electronic Invoicing module offers three different DIAN environments to connect with:
102
127
103
- Once Odoo and Carvajal are fully configured and ready for production, deactivate the :guilabel: `Test
104
- mode ` checkbox to use the production database.
128
+ - :guilabel: `Certification Environment `: This environment will be useful to pass the DIAN certification
129
+ process and obtain the enabled status to invoice from Odoo. To activate it, go to
130
+ :menuselection: `Accounting --> Configuration --> Settings ` and enable both the *Test Environment * and
131
+ the *Activate the certification process * checkboxes.
105
132
106
- .. image :: colombia/carvajal-configuration.png
107
- :align: center
108
- :alt: Configure credentials for Carvajal web service in Odoo .
133
+ - :guilabel: ` Testing Environment `: This environment allows reproducing Electronic Invoicing flows and
134
+ validations in the DIAN testing portal. To activate it, go to :menuselection: ` Accounting -->
135
+ Configuration --> Settings ` and check the * Test Environment * checkbox only .
109
136
110
- .. important ::
111
- :guilabel: `Test mode ` must **only ** be used on duplicated databases, **not ** the production
112
- environment.
137
+ - :guilabel: `Production Environment `: Activate production databases to generate valid electronic documents.
138
+ To activate it, go to :menuselection: `Accounting --> Configuration --> Settings ` and disable both
139
+ the *Test Environment * and the *Activate the certification process * checkboxes.
140
+
141
+ .. seealso ::
142
+ For Electronic Invoicing Configurations using the Carvajal solution, review the following
143
+ `video <https://www.youtube.com/watch?v=bzweMwTEbfY&list=PL1-aSABtP6ABxZshems3snMjx7bj_7ZsZ&index=3 >`_.
113
144
114
145
Report data configuration
115
146
-------------------------
@@ -199,9 +230,9 @@ If sales transactions include products with taxes, the :guilabel:`Value Type` fi
199
230
(:guilabel: `ICA `, :guilabel: `IVA `, :guilabel: `Fuente `) are also included. This configuration is used
200
231
to display taxes correctly in the invoice PDF.
201
232
202
- .. image :: colombia/retention-tax-types .png
203
- :align: center
204
- :alt: The ICA, IVA and Fuente fields in the Advanced Options tab in Odoo.
233
+ .. image :: colombia/DIAN-taxes-configuration .png
234
+ :align: center
235
+ :alt: Specific tax configurations per DIAN regulations
205
236
206
237
.. _co-journals :
207
238
@@ -217,16 +248,26 @@ On the sales journal form, input the :guilabel:`Journal Name`, :guilabel:`Type`,
217
248
:guilabel: `Short Code ` in the :guilabel: `Journals Entries ` tab. Then, configure the following data
218
249
in the :guilabel: `Advanced Settings ` tab:
219
250
220
- - :guilabel: `Electronic invoicing `: Enable :guilabel: `UBL 2.1 (Colombia) `.
221
- - :guilabel: `Invoicing Resolution `: Resolution number issued by |DIAN | to the company.
222
- - :guilabel: `Resolution Date `: Initial effective date of the resolution.
223
- - :guilabel: `Resolution end date `: End date of the resolution's validity.
224
- - :guilabel: `Range of Numbering (minimum) `: First authorized invoice number.
225
- - :guilabel: `Range of Numbering (maximum) `: Last authorized invoice number.
251
+ -:guilabel: `Electronic invoicing `: Enable UBL 2.1 (Colombia).
252
+ -:guilabel: `Invoicing Resolution `: Resolution number issued by DIAN to the company via their test set.
253
+ -:guilabel: `Resolution Date `: Initial effective date of the resolution.
254
+ -:guilabel: `Resolution End Date `: End date of the resolution’s validity.
255
+ -:guilabel: `Range of Numbering (minimum) `: First authorized invoice number.
256
+ -:guilabel: `Range of Numbering (maximum) `: Last authorized invoice number.
257
+ -:guilabel: `Technical Key `: Control key received from the DIAN portal test set or from their web service
258
+ in case of the production environment.
226
259
227
- .. note ::
228
- The sequence and resolution of the journal **must ** match the one configured in Carvajal and the
229
- |DIAN |.
260
+ When the database is configured for the **production environment **, instead of configuring these fields
261
+ manually, use the **Reload DIAN configuration ** button to obtain the DIAN Resolution information from the required
262
+ DIAN web service.
263
+
264
+ .. image :: colombia/Reload-DIAN-configuration-button.png
265
+ :align: center
266
+ :alt: Reload DIAN configuration button in Sale Journals
267
+
268
+ .. important ::
269
+ The short code and resolution of the journal **must ** match the ones received in the DIAN portal test set
270
+ or from the **MUISCA ** portal.
230
271
231
272
Invoice sequence
232
273
****************
@@ -243,6 +284,10 @@ Once the |DIAN| has assigned the official sequence and prefix for the *support d
243
284
vendor bills, the purchase journals related to their supporting documents need to be updated in
244
285
Odoo. The process is similar to the configuration of the :ref: `sales journals <co-journals >`.
245
286
287
+ .. seealso ::
288
+ For more information on Support Document Journals using the Carvajal solution review the following
289
+ `video <https://www.youtube.com/watch?v=UmYsFcD7xzE&list=PL1-aSABtP6ABxZshems3snMjx7bj_7ZsZ&index=8 >`_.
290
+
246
291
Chart of accounts
247
292
*****************
248
293
@@ -259,24 +304,18 @@ Main workflows
259
304
Electronic invoices
260
305
-------------------
261
306
262
- The following is a breakdown of the main workflow for electronic invoices with the Colombian
263
- localization:
307
+ The following is a breakdown of the main workflow for electronic invoices with the Colombian localization:
264
308
265
- #. Sender creates an invoice.
266
- #. Electronic invoice provider generates the legal XML file.
267
- #. Electronic invoice provider creates the CUFE (Invoice Electronic Code) with the electronic
268
- signature.
269
- #. Electronic invoice provider sends a notification to |DIAN |.
270
- #. |DIAN | validates the invoice.
271
- #. |DIAN | accepts or rejects the invoice.
272
- #. Electronic invoice provider generates the PDF invoice with a QR code.
273
- #. Electronic invoice provider sends invoice to the acquirer.
274
- #. Acquirer sends a receipt of acknowledgement, and accepts or rejects the invoice.
275
- #. Sender downloads a :file: `.zip ` file with the PDF and XML.
276
-
277
- .. image :: colombia/workflow-electronic-invoice.png
278
- :align: center
279
- :alt: Electronic invoice workflow for Colombian localization.
309
+ 1. Sender creates an invoice.
310
+ 2. Odoo generates the legal XML file.
311
+ 3. Odoo generates the CUFE (Invoice Electronic Code) with the electronic signature.
312
+ 4. Odoo sends a notification to DIAN.
313
+ 5. DIAN validates the invoice.
314
+ 6. DIAN accepts or rejects the invoice.
315
+ 7. Odoo generates the PDF invoice with a QR code.
316
+ 8. Odoo compresses the AttachedDocument (containing the sent XML file and the DIAN validation response)
317
+ and the fiscal valid PDF into a :file: `.zip ` file
318
+ 9. User sends the invoice (:file: `.zip ` file) via Odoo to the acquirer.
280
319
281
320
.. _colombia/invoice-creation :
282
321
@@ -287,58 +326,59 @@ Invoice creation
287
326
The functional workflow taking place before an invoice validation does **not ** alter the main
288
327
changes introduced with the electronic invoice.
289
328
290
- Electronic invoices are generated and sent to both the |DIAN | and customer through Carvajal's web
291
- service integration. These documents can be created from your sales order or manually generated. To
292
- create a new invoice, go to :menuselection: `Accounting --> Customers --> Invoices `, and select
293
- :guilabel: `Create `. On the invoice form configure the following fields:
329
+ Electronic invoices are generated and sent to both the |DIAN | and customer. These documents can be created
330
+ from your sales order or manually generated. To create a new invoice, go to
331
+ :menuselection: `Accounting --> Costumers --> Invoices `, and select **Create **. On the invoice form configure
332
+ the following fields:
333
+
334
+ -:guilabel: `Customer `: Customer’s information.
335
+ -:guilabel: `Journal `: Journal used for electronic invoices.
336
+ -:guilabel: `Electronic Invoice Type `: Select the type of document. By default, Factura de Venta is selected.
337
+ -:guilabel: `Invoice Lines `: Specify the products with the correct taxes.
294
338
295
- - :guilabel: `Customer `: Customer's information.
296
- - :guilabel: `Journal `: Journal used for electronic invoices.
297
- - :guilabel: `Electronic Invoice Type `: Select the type of document. By default, :guilabel: `Factura
298
- de Venta ` is selected.
299
- - :guilabel: `Invoice Lines `: Specify the products with the correct taxes.
339
+ .. important ::
340
+ When creating the first invoice related to an Electronic Invoicing Journal, it is required to manually change the
341
+ **sequence ** of the invoice to the DIAN format corresponding to the `Prefix + Sequence `.
342
+ **Example **: From `SETP1/2024/00001 ` to `SETP1 `
300
343
301
344
When done, click :guilabel: `Confirm `.
302
345
303
346
.. _colombia/invoice-validation :
304
347
305
- Invoice validation
306
- ~~~~~~~~~~~~~~~~~~
307
-
308
- After the invoice confirmation, an XML file is created and sent automatically to Carvajal. The
309
- invoice is then processed asynchronously by the E-invoicing service UBL 2.1 (Colombia). The file is
310
- also displayed in the chatter.
311
-
312
- .. image :: colombia/invoice-sent.png
313
- :align: center
314
- :alt: Carvajal XML invoice file in Odoo chatter.
315
-
316
- The :guilabel: `Electronic Invoice Name ` field is now displayed in the :guilabel: `EDI Documents ` tab,
317
- with the name of the XML file. Additionally, the :guilabel: `Electronic Invoice Status ` field is
318
- displayed with the initial value :guilabel: `To Send `. To process the invoice manually, click on the
319
- :guilabel: `Process Now ` button.
320
-
321
- .. _colombia/invoice-xml :
322
-
323
- Reception of legal XML and PDF
324
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
325
-
326
- The electronic invoice vendor (Carvajal) receives the XML file, and proceeds to validate its
327
- structure and information.
328
-
329
- After validating the electronic invoice, proceed to generate a legal XML which includes a digital
330
- signature and a unique code (CUFE), a PDF invoice that includes a QR code and the CUFE is also
331
- generated. If everything is correct the :guilabel: `Electronic Invoicing ` field value changes to
332
- :guilabel: `Sent `.
333
-
334
- A :file: `.zip ` containing the legal electronic invoice (in XML format) and the invoice in (PDF
335
- format) is downloaded and displayed in the invoice chatter:
336
-
337
- .. image :: colombia/invoice-zip.png
338
- :align: center
339
- :alt: ZIP file displayed in the invoice chatter in Odoo.
340
-
341
- The electronic invoice status changes to :guilabel: `Accepted `.
348
+ Sending Electronic Invoices
349
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
350
+
351
+ After the invoice confirmation, click on the **Print & Send ** button. In the appearing wizard, make sure to enable the
352
+ **DIAN ** and **Email ** checkboxes to send an XML to the DIAN web service and the validated invoice to your client
353
+ fiscal email. After that, click on the Print & Send button:
354
+
355
+ - The XML document is created
356
+ - CUFE is generated
357
+ - The XML is processed synchronously by the DIAN.
358
+ - If accepted, the file is displayed in the chatter and also the email to the client with the corresponding
359
+ :file: `.zip ` file.
360
+
361
+ .. image :: colombia/zip-xml-chatter-colombia.png
362
+ :align: center
363
+ :alt: EDI documents available in the chatter
364
+
365
+ The **DIAN tab ** will now displayed and the next information will be available in the record shown:
366
+
367
+ -:guilabel: `Signed Date `: Timestamp recorded of the XML creation.
368
+ -:guilabel: `Status `: The status result obtained in the DIAN response. If the invoice was rejected, the
369
+ error messages can be seen here.
370
+ -:guilabel: `Testing Environment `: This checkbox will let us know if the document sent was delivered to
371
+ the DIAN testing environment.
372
+ -:guilabel: `Certification Process `: This checkbox will let us know if the document was sent as part of
373
+ the certification process with the DIAN.
374
+ -:guilabel: `Download button `: With this button, it is possible to download the sent XML file, even if
375
+ the DIAN result was “Rejected”.
376
+ -:guilabel: `Fetch Attached Document button `: With this button, it is possible to download the
377
+ generated AttachedDocument file, even if the DIAN.
378
+
379
+ .. image :: colombia/dian-tab-electronic-document.png
380
+ :align: center
381
+ :alt: EDI document record available in DIAN tab
342
382
343
383
Credit notes
344
384
------------
@@ -406,11 +446,21 @@ During the XML validation, the most common errors are related to missing master
406
446
ID *, *Address *, *Products *, *Taxes *). In such cases, error messages are shown in the chatter after
407
447
updating the electronic invoice status.
408
448
409
- After the master data is corrected, it's possible to reprocess the XML with the new data and send
410
- the updated version, using the :guilabel: `Retry ` button.
449
+ .. image :: colombia/validation-error-example-DIAN.png
450
+ :align: center
451
+ :alt: Validation error example before sending electronic documents to the DIAN
452
+
453
+ If the invoice was sent and set as **Rejected ** by the DIAN, the error messages are visible clicking in
454
+ the **“i” ** symbol next to the **Status ** field in the **DIAN tab **. Using the reported error codes, it will be
455
+ possible to review solutions to apply before re-sending.
456
+
457
+ .. image :: colombia/rejected-invoice-error-message.png
458
+ :align: center
459
+ :alt: Example of error messages on rejected invoices
411
460
412
- .. image :: colombia/xml-validation-error.png
413
- :alt: XML validation errors shown in the invoice chatter in Odoo.
461
+ After the master data or other issues are corrected, it’s possible to reprocess the XML following again the
462
+ :doc: `Sending Electronic Invoices <documentation/content/applications/finance/fiscal_localizations/colombia
463
+ /main_workflow/electronic_invoices/sending_electronic_invoices>` flow.
414
464
415
465
.. _colombia/reports :
416
466
0 commit comments