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

[10.0] France-specific part of the account_invoice_factur-x module + Chorus stack #110

Merged
merged 10 commits into from Oct 14, 2017
Copy path View file
@@ -37,7 +37,8 @@ install:
- git clone https://github.com/OCA/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools
- export PATH=${HOME}/maintainer-quality-tools/travis:${PATH}
- travis_install_nightly
- pip install unicodecsv unidecode ofxparse PyPDF2
- pip install unicodecsv unidecode ofxparse
- pip install git+https://github.com/akretion/factur-x
script:
- travis_run_tests
@@ -0,0 +1,51 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
============================
Factur-X Invoices for France
============================
This module implements the France-specific part of the Factur-X standard to generate Factur-X invoices. In particular, it adds the SIRET of the buyer and the seller in the XML file embedded in the PDF invoice.
Factur-X is the e-invoicing standard for France and Germany. The Factur-X specifications are available on the website of `FNFE-MPE <http://fnfe-mpe.org/factur-x/>`_.
This module will be installed automatically when the modules *account_invoice_factur-x* and *l10n_fr_siret* are installed.
Usage
=====
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/121/10.0
Bug Tracker
===========
Bugs are tracked on `GitHub Issues
<https://github.com/OCA/l10n-france/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed feedback.
Credits
=======
Contributors
------------
* Alexis de Lattre <alexis.delattre@akretion.com>
Maintainer
----------
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
To contribute to this module, please visit https://odoo-community.org.
@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import models
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
# © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Factur-X Invoices for France',
'version': '10.0.1.0.0',
'category': 'Localisation',
'license': 'AGPL-3',
'summary': "France-specific module to generate Factur-X invoices",
'author': 'Akretion,Odoo Community Association (OCA)',
'website': 'http://www.akretion.com',
'depends': [
'account_invoice_factur-x',
'l10n_fr_siret',
],
'auto_install': True,
'installable': True,
}
@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import account_invoice
@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
# © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, api
class AccountInvoice(models.Model):
_inherit = 'account.invoice'
@api.model
def _cii_get_party_identification(self, commercial_partner):
res = super(AccountInvoice, self)._cii_get_party_identification(
commercial_partner)
# partner.siret has a value even if partner.nic == False
if commercial_partner.siren and commercial_partner.nic:
res['0002'] = commercial_partner.siret
return res
@@ -7,42 +7,42 @@
MAPPING = {
'20.0': {'categ': 'tax_categ_s', 'type': 'tax_type_vat'},
'20.0-TTC': {'categ': 'tax_categ_s', 'type': 'tax_type_vat'},
'10.0': {'categ': 'tax_categ_a', 'type': 'tax_type_vat'},
'10.0-TTC': {'categ': 'tax_categ_a', 'type': 'tax_type_vat'},
'8.5': {'categ': 'tax_categ_a', 'type': 'tax_type_vat'},
'8.5-TTC': {'categ': 'tax_categ_a', 'type': 'tax_type_vat'},
'5.5': {'categ': 'tax_categ_aa', 'type': 'tax_type_vat'},
'5.5-TTC': {'categ': 'tax_categ_aa', 'type': 'tax_type_vat'},
'2.1': {'categ': 'tax_categ_aa', 'type': 'tax_type_vat'},
'2.1-TTC': {'categ': 'tax_categ_aa', 'type': 'tax_type_vat'},
'10.0': {'categ': 'tax_categ_s', 'type': 'tax_type_vat'},
'10.0-TTC': {'categ': 'tax_categ_s', 'type': 'tax_type_vat'},
'8.5': {'categ': 'tax_categ_s', 'type': 'tax_type_vat'},
'8.5-TTC': {'categ': 'tax_categ_s', 'type': 'tax_type_vat'},
'5.5': {'categ': 'tax_categ_s', 'type': 'tax_type_vat'},
'5.5-TTC': {'categ': 'tax_categ_s', 'type': 'tax_type_vat'},
'2.1': {'categ': 'tax_categ_s', 'type': 'tax_type_vat'},
'2.1-TTC': {'categ': 'tax_categ_s', 'type': 'tax_type_vat'},
'ACH-20.0': {'categ': 'tax_categ_s', 'type': 'tax_type_vat'},
'ACH-20.0-TTC': {'categ': 'tax_categ_s', 'type': 'tax_type_vat'},
'ACH-10.0': {'categ': 'tax_categ_a', 'type': 'tax_type_vat'},
'ACH-10.0-TTC': {'categ': 'tax_categ_a', 'type': 'tax_type_vat'},
'ACH-8.5': {'categ': 'tax_categ_a', 'type': 'tax_type_vat'},
'ACH-8.5-TTC': {'categ': 'tax_categ_a', 'type': 'tax_type_vat'},
'ACH-5.5': {'categ': 'tax_categ_aa', 'type': 'tax_type_vat'},
'ACH-5.5-TTC': {'categ': 'tax_categ_aa', 'type': 'tax_type_vat'},
'ACH-2.1': {'categ': 'tax_categ_aa', 'type': 'tax_type_vat'},
'ACH-2.1-TTC': {'categ': 'tax_categ_aa', 'type': 'tax_type_vat'},
'ACH-10.0': {'categ': 'tax_categ_s', 'type': 'tax_type_vat'},
'ACH-10.0-TTC': {'categ': 'tax_categ_s', 'type': 'tax_type_vat'},
'ACH-8.5': {'categ': 'tax_categ_s', 'type': 'tax_type_vat'},
'ACH-8.5-TTC': {'categ': 'tax_categ_s', 'type': 'tax_type_vat'},
'ACH-5.5': {'categ': 'tax_categ_s', 'type': 'tax_type_vat'},
'ACH-5.5-TTC': {'categ': 'tax_categ_s', 'type': 'tax_type_vat'},
'ACH-2.1': {'categ': 'tax_categ_s', 'type': 'tax_type_vat'},
'ACH-2.1-TTC': {'categ': 'tax_categ_s', 'type': 'tax_type_vat'},
'IMMO-20.0': {'categ': False, 'type': 'tax_type_vat'},
'IMMO-10.0': {'categ': False, 'type': 'tax_type_vat'},
'IMMO-8.5': {'categ': False, 'type': 'tax_type_vat'},
'IMMO-5.5': {'categ': False, 'type': 'tax_type_vat'},
'IMMO-2.1': {'categ': False, 'type': 'tax_type_vat'},
'ACH_UE_due-20.0': {'categ': 'tax_categ_b', 'type': 'tax_type_vat'},
'ACH_UE_due-10.0': {'categ': 'tax_categ_b', 'type': 'tax_type_vat'},
'ACH_UE_due-8.5': {'categ': 'tax_categ_b', 'type': 'tax_type_vat'},
'ACH_UE_due-5.5': {'categ': 'tax_categ_b', 'type': 'tax_type_vat'},
'ACH_UE_due-2.1': {'categ': 'tax_categ_b', 'type': 'tax_type_vat'},
'ACH_UE_ded.-20.0': {'categ': 'tax_categ_b', 'type': 'tax_type_vat'},
'ACH_UE_ded.-10.0': {'categ': 'tax_categ_b', 'type': 'tax_type_vat'},
'ACH_UE_ded.-8.5': {'categ': 'tax_categ_b', 'type': 'tax_type_vat'},
'ACH_UE_ded.-5.5': {'categ': 'tax_categ_b', 'type': 'tax_type_vat'},
'ACH_UE_ded.-2.1': {'categ': 'tax_categ_b', 'type': 'tax_type_vat'},
'ACH_UE_due-20.0': {'categ': 'tax_categ_k', 'type': 'tax_type_vat'},
'ACH_UE_due-10.0': {'categ': 'tax_categ_k', 'type': 'tax_type_vat'},
'ACH_UE_due-8.5': {'categ': 'tax_categ_k', 'type': 'tax_type_vat'},
'ACH_UE_due-5.5': {'categ': 'tax_categ_k', 'type': 'tax_type_vat'},
'ACH_UE_due-2.1': {'categ': 'tax_categ_k', 'type': 'tax_type_vat'},
'ACH_UE_ded.-20.0': {'categ': 'tax_categ_k', 'type': 'tax_type_vat'},
'ACH_UE_ded.-10.0': {'categ': 'tax_categ_k', 'type': 'tax_type_vat'},
'ACH_UE_ded.-8.5': {'categ': 'tax_categ_k', 'type': 'tax_type_vat'},
'ACH_UE_ded.-5.5': {'categ': 'tax_categ_k', 'type': 'tax_type_vat'},
'ACH_UE_ded.-2.1': {'categ': 'tax_categ_k', 'type': 'tax_type_vat'},
'EXO-0': {'categ': 'tax_categ_e', 'type': 'tax_type_vat'},
'EXPORT-0': {'categ': 'tax_categ_g', 'type': 'tax_type_vat'},
'UE-0': {'categ': 'tax_categ_g', 'type': 'tax_type_vat'},
'UE-0': {'categ': 'tax_categ_k', 'type': 'tax_type_vat'},
'IMPORT-0': {'categ': 'tax_categ_g', 'type': 'tax_type_vat'},
}
@@ -0,0 +1,64 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
======================
L10n FR Chorus Account
======================
This is the base module for the support of Chorus. Chorus specifications are available on `Chorus Pro Community website <https://communaute-chorus-pro.finances.gouv.fr/>`_. Chorus Pro is the electronic invoicing plateform of the French administration. All the suppliers of the French administration can send their invoices through Chorus and it is progressively becoming an obligation for all suppliers. To know more about Chorus and the obligation to send electronic invoices to the French administration, read `the dedicated page <https://www.economie.gouv.fr/entreprises/marches-publics-facture-electronique>`_ on the website of the Ministry of Economic Affairs.
To be able to generate an electronic invoice for Chorus, you need the module *l10n_fr_chorus_ubl* (or other modules that support a specific e-invoice format).
Configuration
=============
On the customers that you invoice via Chorus, you must:
* enter their *SIRET* (*Accounting* tab),
* select *Chorus* as *Customer Invoice Transmission Method* (*Accounting* tab),
* select the *Info Required for Chorus* to the value that you obtained from Chorus (menu *Rechercher Structure Publique*),
* if the service code is a required information for that customer in Chorus, create an invoicing contact and enter the related *Chorus Service Code* and make sure that this contact is used as *Customer* on the invoice.
Usage
=====
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/121/10.0
Known issues / Roadmap
======================
Add support for the automatic transmission of invoices to Chorus via API (but it requires a RGS 1 star certificate, which costs about 250 € / year).
Bug Tracker
===========
Bugs are tracked on `GitHub Issues
<https://github.com/OCA/l10n-france/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed feedback.
Credits
=======
Contributors
------------
* Alexis de Lattre <alexis.delattre@akretion.com>
Maintainer
----------
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
To contribute to this module, please visit https://odoo-community.org.
@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import models
@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
# © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': u'L10n FR Chorus',
'summary': "Generate Chorus-compliant e-invoices",
'version': '10.0.1.0.0',
'category': 'French Localization',
'author': "Akretion,Odoo Community Association (OCA)",
'website': 'http://www.akretion.com',
'license': 'AGPL-3',
'depends': [
'l10n_fr_siret',
'account_invoice_transmit_method',
'agreement_account',
],
'data': [
'data/transmit_method.xml',
'views/partner.xml',
],
'demo': ['demo/demo.xml'],
'installable': True,
}
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
© 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo noupdate="1">
<record id="chorus" model="transmit.method">
<field name="code">fr-chorus</field>
<field name="name">Chorus</field>
<field name="supplier_ok" eval="False"/>
</record>
</odoo>
Oops, something went wrong.
ProTip! Use n and p to navigate between commits in a pull request.