Files
odoo_source/addons/l10n_fr_fec
Florian Vranckxandxmo-odoo 7dc2190fa4 [IMP] test_lint, * : SQL injection detection
This commit brings a new way to detect sql injection.

Previously, this test was meant to push developers to use the second argument of cr.execute(query,args) for parameters.

However, this also meant that the test will always be green as soon as the second argument is used.

This commit aims to change that by tracking the source of information of all variables used to build a query. Parsing of the AST in reverse, starting from the query variable itself.

However these are some current limitations:
  -The hierarchy of Odoo modules is currently not taken into account. If two functions have the same name, they will both be evaluated to find if their return value is part of the query
  -Object mutation is not supported and is not evaluated
  -Whitelisted values are too wide in order to reduce the amount of false positives.

Even if this test is blocking, it can be disabled by adding #pylint: disable=sql-injection at the end of the line.

closes odoo/odoo#101237

Related: odoo/enterprise#35697
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Co-authored-by: xmo-odoo <xmo@odoo.com>
2023-01-26 14:19:00 +01:00
..
…

Fichier d'Échange Informatisé (FEC) pour la France
==================================================

Ce module permet de générer le fichier FEC tel que définit par `l'arrêté du 29
Juillet 2013 <http://legifrance.gouv.fr/eli/arrete/2013/7/29/BUDE1315492A/jo/texte>`
portant modification des dispositions de l'article A. 47 A-1 du
livre des procédures fiscales.

Cet arrêté prévoit l'obligation pour les sociétés ayant une comptabilité
informatisée de pouvoir fournir à l'administration fiscale un fichier
regroupant l'ensemble des écritures comptables de l'exercice. Le format de ce
fichier, appelé *FEC*, est définit dans l'arrêté.

Le détail du format du FEC est spécifié dans le bulletin officiel des finances publiques `BOI-CF-IOR-60-40-20-20131213 <http://bofip.impots.gouv.fr/bofip/ext/pdf/createPdfWithAnnexePermalien/BOI-CF-IOR-60-40-20-20131213.pdf?doc=9028-PGP&identifiant=BOI-CF-IOR-60-40-20-20131213>` du 13 Décembre 2013. Ce module implémente le fichier
FEC au format texte et non au format XML, car le format texte sera facilement
lisible et vérifiable par le comptable en utilisant un tableur.

La structure du fichier FEC généré par ce module a été vérifiée avec le logiciel
*Test Compta Demat* version 1_00_05 disponible sur
`le site de la direction générale des finances publiques <http://www.economie.gouv.fr/dgfip/outil-test-des-fichiers-des-ecritures-comptables-fec>`
en utilisant une base de donnée Odoo réelle.

Configuration
=============

Aucune configuration n'est nécessaire.

Utilisation
===========

Pour générer le *FEC*, allez dans le menu *Accounting > Reporting > French Statements > FEC* qui va démarrer l'assistant de génération du FEC.

Credits
=======

Contributors
------------

* Alexis de Lattre <alexis.delattre@akretion.com>