Skip to content

[FW][IMP] localization: Add Chorus pro via Peppol information #13130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -95,6 +95,8 @@ e-invoicing option to generate and attach the e-invoice file.
.. image:: electronic_invoicing/send-window.png
:alt: The Peppol option is checked and an e-invoicing XML file is attached to the email.

.. _e-invoicing/peppol:

Peppol
======

@@ -121,6 +123,8 @@ If not done yet, :ref:`install <general/install>` the :guilabel:`Peppol` module
Monaco, Montenegro, North Macedonia, Malta, Netherlands, Norway, Poland, Portugal, Romania,
Serbia, Sweden, Slovenia, Slovakia, San Marino, Turkey, Holy See (Vatican City State)

.. _e-invoicing/peppol-registration:

Registration
------------

666 changes: 395 additions & 271 deletions content/applications/finance/fiscal_localizations/france.rst
Original file line number Diff line number Diff line change
@@ -2,58 +2,214 @@
France
======

.. _france/fec:
.. _localizations/france/configuration/modules:

Modules
=======

The following modules related to the French localization are available:

.. list-table::
:header-rows: 1

* - Name
- Technical name
- Description
* - :guilabel:`France - Accounting`
- `l10n_fr`
- French :ref:`fiscal localization package <fiscal_localizations/packages>` that applies only
to companies based in mainland France and doesn't include DOM-TOMs.
* - :guilabel:`France - Accounting Reports`
- `l10n_fr_reports`
- Export of the French VAT report, which can be sent to the DGFiP, an OGA, or a professional
accountant.
* - :guilabel:`France - Payroll with Accounting`
- `l10n_fr_hr_payroll_account`
- Includes the necessary accounting data for the French payroll rules.
* - :guilabel:`France - Factur-X integration with Chorus Pro`
- `l10n_fr_facturx_chorus_pro`
- Adds fields needed for :ref:`submitting invoices to Chorus Pro
<localizations/france/e-invoicing>`.
* - :guilabel:`France - FEC Export`
- `l10n_fr_fec`
- Generates the FEC file as defined by the `Decree of July 29, 2013
<http://legifrance.gouv.fr/eli/arrete/2013/7/29/BUDE1315492A/jo/texte>`_.
* - :guilabel:`France - FEC Import`
- `l10n_fr_fec_import`
- Import of standard FEC files, useful for importing accounting history.
* - :guilabel:`France - Adding Mandatory Invoice Mentions (Decree no. 2022-1299)`
- `l10n_fr_invoice_addr`
- Adds address fields required to comply with `Decree 2022-1299
<https://www.legifrance.gouv.fr/jorf/id/JORFTEXT000046383394>`_.
* - :guilabel:`France - VAT Anti-Fraud Certification for Point of Sale (CGI 286 I-3 bis)`
- `10n_fr_pos_cert`
- :ref:`Point of Sale VAT anti-fraud certification
<localizations/france/vat-anti-fraud-certification>`

.. note::
The localization's core modules are installed automatically with the localization. The rest can
be manually :doc:`installed </applications/general/apps_modules>`.

.. _localizations/france/loc-overview:

Localization overview
=====================

The French localization package ensures compliance with French fiscal and accounting regulations. It
includes tools for managing taxes, fiscal positions, reporting, and a predefined chart of accounts
tailored to France’s standards.

The French localization package provides the following key features to ensure compliance with local
fiscal and accounting regulations:

- :doc:`../accounting/get_started/chart_of_accounts`: a predefined structure tailored to French
accounting standards
- :doc:`../accounting/taxes/fiscal_positions`: automated tax adjustments based on customer or
supplier registration status
- :doc:`Taxes <../accounting/taxes>`: pre-configured tax rates, including standard VAT,
zero-rated, and exempt options
- :doc:`Payroll </applications/hr/payroll>`
- :ref:`Reporting <localizations/france/reporting>`

.. _localizations/france/reporting:

Reporting
---------

:doc:`Installing </applications/general/apps_modules>` the :guilabel:`France - Accounting`
(`l10n_fr`) module gives access to some accounting reports specific to France, such as:

- :guilabel:`Bilan comptable (FR)` (:guilabel:`Balance Sheet`)
- :guilabel:`Compte de résultats (FR)` (:guilabel:`Profit and Loss`)
- :guilabel:`Rapport de taxes (FR)` (:guilabel:`Tax Report`)

.. _localizations/france/accounting:

Accounting
==========

.. _localizations/france/e-invoicing:

E-Invoicing
-----------

The `Chorus Pro <https://portail.chorus-pro.gouv.fr/aife_csm>`_ portal, managed by the AIFE (Agence
pour l'Informatique financière de l'État), is the official platform for submitting electronic
invoices to French public entities. It allows businesses to send and manage invoices, track their
processing status, and access payment updates. Since January 2020, electronic invoicing has been
mandatory for all business-to-government (B2G) transactions in France. Odoo supports integration
with Chorus Pro to submit invoices generated in Odoo.

.. _localizations/france/e-invoicing-configuration:

Configuration
~~~~~~~~~~~~~

To send invoices to Chorus Pro, the following configuration is required:

#. :doc:`Install </applications/general/apps_modules>` the :guilabel:`France - Factur-X integration
with Chorus Pro` (`l10n_fr_facturx_chorus_pro`) module.
#. :ref:`Register <e-invoicing/peppol-registration>` with Peppol, as invoices are sent from Odoo to
Chorus Pro via the :ref:`Peppol <e-invoicing/peppol>` network.
#. If you don’t already have a Chorus Pro account, go to the `Chorus Pro
<https://portail.chorus-pro.gouv.fr/aife_csm>`_ page, click :guilabel:`Créer un compte`, and
create one.
#. :ref:`Configure the relevant customers' contact form
<localizations/france/e-invoicing-contacts>`.

.. seealso::
`Chorus Pro documentation <https://portail.chorus-pro.gouv.fr/aife_documentation>`_

.. _localizations/france/e-invoicing-contacts:

Customers
*********

To submit invoices to Chorus Pro, configure the relevant customers' contact form as follows:

#. Verify the :guilabel:`Country` and :guilabel:`Tax ID` fields are filled out.
#. In the :guilabel:`Sales & Purchase` tab, ensure the :guilabel:`SIRET` field is completed.
#. In the :guilabel:`Accounting` tab, fill in the following fields in the :guilabel:`Electronic
Invoicing` section:

- :guilabel:`Format`: Select :guilabel:`BIS Billing 3.0`.
- :guilabel:`Peppol e-address (EAS)`: Select :guilabel:`0009 - SIRET-CODE`.
- :guilabel:`Peppol Endpoint`: Type `11000201100044`, the reference used by Chorus Pro.

.. _localizations/france/e-invoicing-invoices:

Sending invoices to Chorus Pro
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To send invoices to Chorus Pro, follow these steps:

#. Go to :menuselection:`Accounting --> Customers --> Invoices` and open or create the invoice.
#. Make sure the following fields are filled in the :guilabel:`Other Info` tab:

- :guilabel:`Buyer Reference`: :guilabel:`Service Exécutant` in Chorus Pro
- :guilabel:`Contract Reference`: :guilabel:`Numéro de Marché` in Chorus Pro
- :guilabel:`Purchase Order Reference`: :guilabel:`Engagement Juridique` in Chorus Pro

#. Confirm the invoice.
#. Click :guilabel:`Send & Print` and, in the :guilabel:`Send` window, enable :guilabel:`Peppol Bis
Billing 3.0`.
#. Click :guilabel:`Send & Print`.

Once the invoice is sent, the Peppol status of the invoice is updated to :guilabel:`Done`.

.. seealso::
:ref:`Peppol <e-invoicing/peppol>`

.. _localizations/france/fec:

FEC - Fichier des Écritures Comptables
======================================
--------------------------------------

An FEC :dfn:`Fichier des Écritures Comptables` audit file contains all the accounting data and entries
recorded in all the accounting journals for a financial year. The entries in the file must be
arranged in chronological order.
An FEC :dfn:`Fichier des Écritures Comptables` audit file contains all the accounting data and
entries recorded in all the accounting journals for a financial year. The entries in the file must
be arranged in chronological order. Since January 2014, every French company is required to produce
and transmit this file upon request by the tax authorities for audit purposes.

Since January 1st, 2014, every French company is required to produce and transmit this file upon
request by the tax authorities for audit purposes.
.. _localizations/france/fec-import:

FEC Import
----------
~~~~~~~~~~

To make the onboarding of new users easier, Odoo Enterprise's French :ref:`fiscal localization
package <fiscal_localizations/packages>` includes the **FEC Import** feature (module name:
``l10n_fr_fec_import``), which enables the import of existing FEC files from older software.
:doc:`Install </applications/general/apps_modules>` the :guilabel:`France - FEC Import`
(`l10n_fr_fec_import`) module to import FEC files from other software.

To enable this feature, go to :menuselection:`Accounting --> Configuration --> Settings -->
Accounting Import`, enable **FEC Import**, and *Save*.

Next, go to :menuselection:`Accounting --> Configuration --> FEC Import`, upload your FEC file, and
click on *Import*.
To enable this feature, go to :menuselection:`Accounting --> Configuration --> Settings`. In the
:guilabel:`Accounting Import` section, click :icon:`oi-arrow-right` :guilabel:`Import` and
:guilabel:`Import FEC`. Then, in the :guilabel:`FEC Import` window, upload the FEC file and click
:guilabel:`Import`.

.. note::
Importing FEC files from different years requires no particular actions or computations. However,
if multiple files contain RAN :dfn:`Reports à Nouveaux` with the starting balance for the year,
these entries are automatically marked as unnecessary in Odoo and may need to be deleted.

| Importing FEC files from different year takes no particular action or computation.
| Should multiple files contain any "Reports à Nouveaux" (RAN) with the starting balance of the
year, you might need to cancel those entries in the User Interface. Odoo makes those entries
(RAN) useless.
.. _localizations/france/fec-file-formats:

File formats
~~~~~~~~~~~~

FEC files can only be in CSV format, as the XML format is not supported.
************

.. note::
- FEC files must be in CSV format, as XML format is not supported.
- The FEC CSV file is a plain text file structured as a data table. The first line serves as the
header, defining the list of fields for each entry, and each following line represents a single
accounting entry without any specific order.

The FEC CSV file has a plain text format representing a data table, with the first line being a
header and defining the list of fields for each entry, and each following line representing one
accounting entry, in no predetermined order.

Our module expects the files to meet the following technical specifications:
FEC files must comply with the following technical specifications:

- **Encoding**: UTF-8, UTF-8-SIG and iso8859_15.
- **Separator**: any of these: `;` or `|` or `,` or `TAB`.
- **Line terminators**: both CR+LF (`\\r\\n`) and LF (`\\n`) character groups are supported.
- **Date format**: `%Y%m%d`

.. _localizations/france/fec-fields:

Fields description and use
~~~~~~~~~~~~~~~~~~~~~~~~~~
**************************

+----+---------------+--------------------------------------+-----------------------------------+-----------------+
| # | Field name | Description | Use | Format |
@@ -105,7 +261,7 @@ Fields description and use
| | | (accepts null) | | |
+----+---------------+--------------------------------------+-----------------------------------+-----------------+

These two fields can be found in place of the others in the sence above.
These two fields appear in the same order as the others, replacing them.

+----+---------------+--------------------------------------+-----------------------------------+-----------------+
| 12 | Montant | Amount | `move_line.debit` | Float |
@@ -115,66 +271,65 @@ These two fields can be found in place of the others in the sence above.
| | | or "D" for Debit | or `move_line.credit` | |
+----+---------------+--------------------------------------+-----------------------------------+-----------------+

.. _localizations/france/fec-implementation:

Implementation details
~~~~~~~~~~~~~~~~~~~~~~
**********************

The following accounting entities are imported from the FEC files: **Accounts, Journals, Partners**,
and **Moves**.

Our module determines the encoding, the line-terminator character, and the separator that are used
in the file.

A check is then performed to see if every line has the correct number of fields corresponding to the
header.
and **Moves**. The module automatically determines the encoding, line terminator, and separator used
in the file. Next, a check is performed to ensure that each line has the correct number of fields
matching the header. If the check is successful, the entire file is read, stored in memory, and
scanned. Accounting entities are then imported one type at a time in the following order.

If the check passes, then the file is read in full, kept in memory, and scanned. Accounting entities
are imported one type at a time, in the following order.
.. _localizations/france/fec-accounts:

Accounts
********

Every accounting entry is related to an account, which should be determined by the field
`CompteNum`.
^^^^^^^^

Code matching
*************
Each accounting entry is associated with an account identified by the :guilabel:`CompteNum` field.

Should a similar account code already be present in the system, the existing one is used instead of
creating a new one.
.. _localizations/france/fec-code-matching:

Accounts in Odoo generally have a number of digits that are default for the fiscal localization. As
the FEC module is related to the French localization, the default number of relevant digits is 6.
Code matching
^^^^^^^^^^^^^

This means that the account codes the trailing zeroes are right-trimmed, and that the comparison
between the account codes in the FEC file and the ones already existing in Odoo is performed only on
the first six digits of the codes.
If an account with the same code already exists, the existing one is used rather than creating a new
one. In Odoo, account numbers follow the default digit length of the fiscal localization. Since the
FEC module is tied to the French localization, the default account length is 6 digits.
This means that trailing zeros in account codes are removed, and the comparison between the account
codes in the FEC file and those already in Odoo is made based only on the first six digits of the
codes.

.. example::
The account code `65800000` in the file is matched against an existing `658000` account in Odoo,
and that account is used instead of creating a new one.
The account code `65800000` in the file is matched with an existing `658000` account in Odoo,
and the existing account is used instead of creating a new one.

.. _localizations/france/fec-reconcilable-flag:

Reconcilable flag
*****************
^^^^^^^^^^^^^^^^^

An account is technically flagged as *reconcilable* if the first line in which it appears has the
`EcritureLet` field filled out, as this flag means that the accounting entry is going to be
reconciled with another one.
:guilabel:`EcritureLet` field filled out, indicating that the accounting entry will be reconciled
with another one.

.. note::
The field can be left empty on the line, but the entry must still be reconciled with an
unrecorded payment. The account is flagged as reconcilable once the import of the move lines
requires it.

In case the line somehow has this field not filled out, but the entry still has to be reconciled
with a payment that hasn't yet been recorded, this isn't a problem anyway; the account is
flagged as reconcilable as soon as the import of the move lines requires it.
.. _localizations/france/fec-account-type:

Account type and Templates matching
***********************************
Account type and templates matching
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

As the **type** of the account is not specified in the FEC format, **new** accounts are created
with the default type *Current Assets* and then, at the end of the import process, they are
matched against the installed Chart of Account templates. Also, the *reconcile* flag is also
computed this way.
Since the account **type** is not specified in the FEC format, **new** accounts are created with the
default type :guilabel:`Current Assets`. After the import process, they are matched against the
installed Chart of Account templates. The *reconcile* flag is also determined this way.

The match is done with the left-most digits, starting by using all digits, then 3, then 2.
The matching is performed by comparing the left-most digits, starting with all digits, followed by
3 digits, and then 2 digits.

.. example::

@@ -188,51 +343,55 @@ The match is done with the left-most digits, starting by using all digits, then
| **Result** | | | | Match **found** |
+------------+------------+-----------------+---------------------+---------------------+

The type of the account is then flagged as *payable* and *reconcilable* as per the account template.
The account type is then flagged as :guilabel:`payable` and :guilabel:`reconcilable` based on the
account template.

.. _localizations/france/fec-journals:

Journals
********
^^^^^^^^

Journals are also checked against those already existing in Odoo to avoid duplicates, also in the
case of multiple FEC files imports.
Journals are checked against the existing ones in Odoo to avoid duplicates, even when importing
multiple FEC files.

Should a similar journal code already be present in the system, the existing one is used instead of
creating a new one.
If a journal with the same code already exists, the existing journal is used instead of creating a
new one.

New journals have their name prefixed by the string ``FEC-``.
New journals have the prefix :guilabel:`FEC-` added to their name. For example, :guilabel:`ACHATS`
becomes :guilabel:`FEC-ACHATS`.

.. example::
`ACHATS` -> `FEC-ACHATS`
.. note::
Journals are *not* archived, allowing the user to manage them as desired.

The journals are *not* archived, the user is entitled to handle them as he wishes.
.. _localizations/france/fec-journal-type:

Journal type determination
**************************
^^^^^^^^^^^^^^^^^^^^^^^^^^

The journal type is also not specified in the format (as per the accounts) and therefore it is
at first created with the default type `general`.
The journal type is not specified in the format (similar to the accounts) and is initially created
with the default type :guilabel:`general`.

At the end of the import process, the type is determined as per these rules regarding related
moves and accounts:
At the end of the import process, the journal type is determined based on the following rules
regarding related moves and accounts:

- | `bank`: Moves in these journals always have a line (debit or credit) impacting a
- | :guilabel:`bank`: Moves in these journals always include a line (debit or credit) impacting a
liquidity account.
| `cash` / `bank` can be interchanged, so `bank` is set everywhere when this condition is met.
- | `sale`: Moves in these journals mostly have debit lines on receivable accounts and
| :guilabel:`cash` / :guilabel:`bank` can be interchanged, so :guilabel:`bank` is assigned when
this condition is met.
- | :guilabel:`sale`: Moves in these journals mostly have debit lines on receivable accounts and
credit lines on tax income accounts.
| Sale refund journal items are debit/credit inverted.
- | `purchase`: Moves in these journals mostly have credit lines on payable accounts and
- | :guilabel:`purchase`: Moves in these journals mostly have credit lines on payable accounts and
debit lines on expense accounts.
| Purchase refund journal items are debit/credit inverted.
- | `general`: for everything else.
- | :guilabel:`general`: Used for everything else.

.. note::

- A minimum of three moves is necessary for journal type identification.
- A threshold of 70% of moves must correspond to a criteria for a journal type to be determined.
- A minimum of three moves is required to identify the journal type.
- A threshold of 70% of the moves must meet the criteria for a journal type to be determined.

.. example::
Suppose we are analyzing the moves that share a certain `journal_id`.
Suppose we are analyzing the moves that share a certain :guilabel:`journal_id`.

+------------------------------------------------------------+-------+------------+
| Moves | Count | Percentage |
@@ -246,260 +405,225 @@ moves and accounts:
| **Total** | 4 | 100% |
+------------------------------------------------------------+-------+------------+

The journal `type` would be `bank`, because the bank moves percentage (75%) exceeds the threshold
(70%).
The journal :guilabel:`type` would be :guilabel:`bank`, because the bank's move percentage (75%)
exceeds the threshold (70%).

Partners
********
.. _localizations/france/fec-partners:

Each partner keeps its `Reference` from the field `CompAuxNum`.
Contacts
^^^^^^^^

.. note::
Each contact keeps its :guilabel:`Reference` from the :guilabel:`CompAuxNum` field.

These fields are searchable, in line with former FEC imports on the accounting expert's side for
fiscal/audit purposes.
.. note::
These fields are searchable based on previous FEC imports for fiscal/audit purposes.

.. tip::
Similar and potential duplicate contacts can be merged using the Data Cleaning App.

Users can merge partners with the Data Cleaning App, where Vendors and Customers or similar
partner entries may be merged by the user, with assistance from the system that groups them by
similar entries.
.. _localizations/france/fec-moves:

Moves
*****
^^^^^

Entries are posted and reconciled immediately upon submission, with the :guilabel:`EcritureLet`
field used to match the entries.

Entries are immediately posted and reconciled after submission, using the `EcritureLet` field to
do the matching between the entries themselves.
The :guilabel:`EcritureNum` field represents the name of the moves, but it may sometimes be left
empty. In such cases, the :guilabel:`PieceRef` field is used instead.

The `EcritureNum` field represents the name of the moves. We noticed that sometimes it may not be
filled out. In this case, the field `PieceRef` is used.
.. _localizations/france/fec-rounding-issue:

Rounding issues
***************
^^^^^^^^^^^^^^^

There is a rounding tolerance with a currency-related precision on debit and credit (i.e., 0.01 for
EUR). Under this tolerance, a new line is added to the move, named *Import rounding difference*,
targeting the accounts:
A rounding tolerance is applied based on currency precision for debit and credit amounts (i.e., 0.01
for EUR). If the difference falls under this tolerance, a new line is added to the move, called
:guilabel:`Import rounding difference`, targeting the following accounts:

- `658000` Charges diverses de gestion courante, for added debits
- `758000` Produits divers de gestion courante, for added credits

.. _localizations/france/fec-missing-move-name:

Missing move name
*****************
^^^^^^^^^^^^^^^^^

Should the `EcritureNum` not be filled out, it may also happen that the `PieceRef` field is also
not suited to determine the move name (it may be used as an accounting move line reference) leaving
no way to actually find which lines are to be grouped in a single move, and effectively impeding the
creation of balanced moves.
If the the :guilabel:`EcritureNum` field is not filled out and :guilabel:`PieceRef` field is not
suited to determine the move name (it may be used as an accounting move line reference), it becomes
impossible to identify which lines should be grouped into a single move, and effectively preventing
the creation of balanced moves.

One last attempt is made, grouping all lines from the same journal and date (`JournalLib`,
`EcritureDate`). Should this grouping generate balanced moves (sum(credit) - sum(debit) = 0), then
each different combination of journal and date creates a new move.
In such cases, a final attempt is made to group all lines by the same journal and date
(:guilabel:`JournalLib`, :guilabel:`EcritureDate`). If this grouping generates balanced moves
(sum(credit) - sum(debit) = 0), then each different combination of journal and date creates a new
move.

.. example::
`ACH` + `2021/05/01` --> new move on journal `ACH` with name `20210501`.

Should this attempt fail, the user is prompted an error message with all the move lines that are
supposedly unbalanced.

Partner information
*******************

If a line has the partner information specified, the information is copied to the accounting move
itself if the targeted Journal is of type *payable* or *receivable*.
If this attempt fails, an error message is displayed, listing all the move lines that are considered
unbalanced.

Export
------
.. _localizations/france/fec-partner-information:

If you have installed the French :ref:`fiscal localization package <fiscal_localizations/packages>`,
you should be able to download the FEC. To do so, go to :menuselection:`Accounting --> Reporting -->
France --> FEC`.
Contact information
^^^^^^^^^^^^^^^^^^^

.. tip::
If a line includes contact information, it is copied to the accounting move itself, provided the
targeted journal is of type :guilabel:`payable` or :guilabel:`receivable`.

If you do not see the submenu **FEC**, go to :menuselection:`Apps`, remove the *Apps* filter,
then search for the module named **France-FEC** and make sure it is installed.
.. _localizations/france/fec-export:

.. seealso::
FEC Export
~~~~~~~~~~

- `Official Technical Specification (fr)
<https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000027804775>`_
- `Test-Compta-Demat (Official FEC Testing tool)
<https://github.com/DGFiP/Test-Compta-Demat>`_
To download the FEC, :doc:`install </applications/general/apps_modules>` the :guilabel:`France - FEC
Export` (`l10n_fr_fec`) module, then go to :menuselection:`Accounting -->
Reporting --> FEC`. In the :guilabel:`FEC` window, fill in the following fields:

French Accounting Reports
=========================
- :guilabel:`Start Date`
- :guilabel:`End Date`
- :guilabel:`Test File`: Enable this option to test the FEC file generation.
- :guilabel:`Excluded Journals`

If you have installed the French Accounting, you will have access to some accounting reports
specific to France:
Then, click :guilabel:`Generate`.

- Bilan comptable
- Compte de résultats
- Plan de Taxes France
.. seealso::
- `Official Technical Specification (fr)
<https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000027804775>`_
- `Test-Compta-Demat (Official FEC Testing tool)
<https://github.com/DGFiP/Test-Compta-Demat>`_

Get the VAT anti-fraud certification with Odoo
==============================================
.. _localizations/france/pos:

As of January 1st 2018, a new anti-fraud legislation comes into effect
in France and DOM-TOM. This new legislation stipulates certain criteria
concerning the inalterability, security, storage and archiving of sales data.
These legal requirements are implemented in Odoo, version 9 onward,
through a module and a certificate of conformity to download.
Point of sale
=============

Is my company required to use anti-fraud software?
--------------------------------------------------
.. _localizations/france/vat-anti-fraud-certification:

Your company is required to use an anti-fraud cash register software like
Odoo (CGI art. 286, I. 3° bis) if:
VAT anti-fraud certification
----------------------------

- You are taxable (not VAT exempt) in France or any DOM-TOM,
- Some of your customers are private individuals (B2C).
Since January 2018, new anti-fraud legislation has been in effect in France and its overseas
territories (DOM-TOM). This legislation establishes specific requirements for the integrity,
security, storage, and archiving of sales data. Odoo complies with these legal requirements by
providing a module and a downloadable certificate of conformity.

This rule applies to any company size. Auto-entrepreneurs are exempted from
VAT and therefore are not affected.
Anti-fraud cash register software, such as Odoo (CGI art. 286, I. 3° bis), is required for companies
taxable in France or DOM-TOM, where some customers are private individuals (B2C). This rule applies
to all company sizes, but auto-entrepreneurs exempt from VAT are unaffected.

Get certified with Odoo
-----------------------
.. seealso::
- `Frequently Asked Questions
<https://www.economie.gouv.fr/files/files/directions_services/dgfip/controle_fiscal/actualites_reponses/logiciels_de_caisse.pdf>`_
- `Official Statement
<http://bofip.impots.gouv.fr/bofip/10691-PGP.html?identifiant=BOI-TVA-DECLA-30-10-30-20160803>`_
- `Item 88 of Finance Law 2016
<https://www.legifrance.gouv.fr/affichTexteArticle.do?idArticle=JORFARTI000031732968&categorieLien=id&cidTexte=JORFTEXT000031732865>`_

Getting compliant with Odoo is very easy.
.. _localizations/france/pos-odoo-certification:

Your company is requested by the tax administration to deliver a certificate
of conformity testifying that your software complies with the anti-fraud
legislation. This certificate is granted by Odoo SA to Odoo Enterprise users
`here <https://www.odoo.com/my/contract/french-certification/>`_.
If you use Odoo Community, you should :doc:`upgrade to Odoo Enterprise
</administration/on_premise/community_to_enterprise>` or contact your Odoo service provider.
Odoo certification
~~~~~~~~~~~~~~~~~~

In case of non-conformity, your company risks a fine of €7,500.
The tax administration requires all companies to provide a certificate of conformity confirming that
their software complies with anti-fraud legislation. In case of non-compliance, a €7,500 fine may be
imposed.

To get the certification, just follow the following steps:
.. note::
This `certificate <https://www.odoo.com/my/contract/french-certification/>`_ is granted by Odoo
SA to Odoo Enterprise users.

- If you use **Odoo Point of Sale**, :ref:`install <general/install>` the **France - VAT Anti-Fraud
Certification for Point of Sale (CGI 286 I-3 bis)** module by going to :menuselection:`Apps`,
removing the *Apps* filter, then searching for *l10n_fr_pos_cert*, and installing the module.
To get the certification, follow these steps:

- Make sure a country is set on your company, otherwise your entries won’t be
encrypted for the inalterability check. To edit your company’s data,
go to :menuselection:`Settings --> Users & Companies --> Companies`.
Select a country from the list; Do not create a new country.
- Download the mandatory certificate of conformity delivered by Odoo SA `here <https://www.odoo.com/my/contract/french-certification/>`__.
#. :doc:`Install </applications/general/apps_modules>` the :guilabel:`France - VAT Anti-Fraud
Certification for Point of Sale (CGI 286 I-3 bis)` (`l10n_fr_pos_cert`) module.
#. Set the :guilabel:`Country` field on the :doc:`company record </applications/general/companies>`
to encrypt entries for the inalterability check.
#. Download the mandatory `certificate of conformity
<https://www.odoo.com/my/contract/french-certification/>`_ delivered by Odoo SA.

.. note::

- To install the module in any system created before
December 18th 2017, you should update the modules list.
To do so, activate the :ref:`developer mode <developer-mode>`.
Then go to the *Apps* menu and press *Update Modules List* in the top-menu.
- In case you run Odoo on-premise, you need to update your installation
and restart your server beforehand.
- If you have installed the initial version of the anti-fraud module
(prior to December 18th 2017), you need to update it.
The module's name was *France - Accounting - Certified CGI 286 I-3 bis*.
After an update of the modules list, search for
the updated module in *Apps*, select it and click *Upgrade*.
Finally, make sure the following module *l10n_fr_sale_closing*
is installed.
.. _localizations/france/pos-anti-fraud-features:

Anti-fraud features
-------------------
~~~~~~~~~~~~~~~~~~~

The anti-fraud module introduces the following features:

- **Inalterability**: deactivation of all the ways to cancel or modify
key data of POS orders, invoices and journal entries;
- **Security**: chaining algorithm to verify the inalterability;
- **Storage**: automatic sales closings with computation of both period
and cumulative totals (daily, monthly, annually).
- :ref:`Inalterability <localizations/france/pos-inalterability>`
- :ref:`Security <localizations/france/pos-security>`
- :ref:`Storage <localizations/france/pos-storage>`

.. _localizations/france/pos-inalterability:

Inalterability
~~~~~~~~~~~~~~
**************

All the possible ways to cancel and modify key data of paid POS orders,
confirmed invoices and journal entries are deactivated,
if the company is located in France or in any DOM-TOM.
All methods to cancel or modify key data in POS orders, invoices, and journal entries are
deactivated for companies located in France or any DOM-TOM.

.. note::
In a multi-company environment, only the documents of such companies are impacted.

If you run a multi-companies environment, only the documents of such companies are impacted.
.. _localizations/france/pos-security:

Security
~~~~~~~~

To ensure inalterability, every order or journal entry is encrypted
upon validation.
This number (or hash) is calculated from the key data of the document as
well as from the hash of the precedent documents.
********

The module introduces an interface to test the data inalterability.
If any information is modified on a document after its validation,
the test will fail. The algorithm recomputes all the hashes and compares them
against the initial ones. In case of failure, the system points out the first
To ensure inalterability, every order or journal entry is encrypted upon validation. This number
(or hash) is calculated from the document's key data and the hash of the precedent documents. The
module introduces an interface to test the data's inalterability. The test will fail if any
information is modified on a document after its validation. The algorithm recomputes all the hashes
and compares them against the initial ones. In case of failure, the system points out the first
corrupted document recorded in the system.

Users with *Manager* access rights can launch the inalterability check.
For POS orders, go to
:menuselection:`Point of Sales --> Reporting --> French Statements`.
For invoices or journal entries,
go to :menuselection:`Invoicing/Accounting --> Reporting --> French Statements`.
Only users with :doc:`administrator </applications/general/users/access_rights>` access rights can
initiate the inalterability check:

Storage
~~~~~~~
- For POS orders, go to :menuselection:`Point of Sales --> Reporting --> POS Inalterability Check`;
- For invoices or journal entries, go to :menuselection:`Invoicing/Accounting --> Reporting --> POS
Inalterability Check`.

The system also processes automatic sales closings on a daily, monthly
and annual basis.
Such closings distinctly compute the sales total of the period as well as
the cumulative grand totals from the very first sales entry recorded
in the system.
.. _localizations/france/pos-storage:

Closings can be found in the *French Statements* menu of Point of Sale,
Invoicing and Accounting apps.

.. note::

- Closings compute the totals for journal entries of sales journals (Journal Type = Sales).
Storage
*******

- For multi-companies environments, such closings are performed by company.
The system also processes automatic sales closings daily, monthly, and annually. Such closings
compute the sales total for the period and the cumulative grand totals from the very first sales
entry recorded in the system.

- POS orders are posted as journal entries at the closing of the POS session.
Closing a POS session can be done anytime.
To prompt users to do it on a daily basis, the module prevents from resuming
a session opened more than 24 hours ago.
Such a session must be closed before selling again.
To access closings, either go to :menuselection:`Point of Sales --> Reporting --> Sales Closings` or
:menuselection:`Invoicing/Accounting --> Reporting --> Sales Closings`.

- A period’s total is computed from all the journal entries posted after the
previous closing of the same type, regardless of their posting date.
If you record a new sales transaction for a period already closed,
it will be counted in the very next closing.
.. note::
- Closings compute the totals for journal entries of sales journals (Journal Type = Sales).
- For multi-companies environments, such closings are performed by company.
- POS orders are posted as journal entries at the closing of the POS session. Closing a POS
session can be done anytime. To prompt users to do it daily, the module prevents them from
resuming a session that was opened more than 24 hours ago. Such a session must be closed before
selling again.
- A period’s total is computed from all the journal entries posted after the previous closing of
the same type, regardless of their posting date. Recording a new sales transaction for a
period already closed will be counted in the very next closing.

.. tip::
For test & audit purposes, closings can be manually generated in :ref:`developer mode
<developer-mode>`. To do so, go to :menuselection:`Settings --> Technical --> Scheduled Actions`.
In the scheduled actions list view, open the desired :guilabel:`Sale Closing` action and click
:guilabel:`Run manually`.

- For test & audit purposes such closings can be manually generated in the
:ref:`developer mode <developer-mode>`.
- Then go to :menuselection:`Settings --> Technical --> Automation --> Scheduled Actions`.
.. _localizations/france/pos-responsibilities:

Responsibilities
----------------
~~~~~~~~~~~~~~~~

Do not uninstall the module! If you do so, the hashes will be reset and none
of your past data will be longer guaranteed as being inalterable.
Uninstalling this module will reset the security hashes. This means the system will no longer
guarantee the integrity of the past data.

Users remain responsible for their Odoo instance and must use it with
due diligence. It is not permitted to modify the source code which guarantees
the inalterability of data.

Odoo absolves itself of all and any responsibility in case of changes
in the module’s functions caused by 3rd party applications not certified by Odoo.

More Information
----------------

You can find more information about this legislation in the following official documents.

.. seealso::
Users are responsible for their Odoo system and must operate it carefully. Modifying source code
responsible for ensuring data integrity is not allowed.

- `Frequently Asked Questions
<https://www.economie.gouv.fr/files/files/directions_services/dgfip/controle_fiscal/actualites_reponses/logiciels_de_caisse.pdf>`_
- `Official Statement
<http://bofip.impots.gouv.fr/bofip/10691-PGP.html?identifiant=BOI-TVA-DECLA-30-10-30-20160803>`_
- `Item 88 of Finance Law 2016
<https://www.legifrance.gouv.fr/affichTexteArticle.do?idArticle=JORFARTI000031732968&categorieLien=id&cidTexte=JORFTEXT000031732865>`_
Odoo is not responsible for any issues with this module's functionality if caused by uncertified
third-party applications.