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] Add support for Factur-X standard #22

Merged
merged 35 commits into from Oct 14, 2017
Commits
Jump to file or symbol
Failed to load files and symbols.
+3,363 −849
Diff settings

Always

Just for now

View
@@ -55,7 +55,7 @@ install:
#- wget -P /tmp http://public.akretion.com/pdftotext-3.04
#- sudo mv /tmp/pdftotext-3.04 /usr/local/bin/pdftotext
#- sudo chmod 755 /usr/local/bin/pdftotext
- pip install PyPDF2 # needed for account_invoice*zugferd
- pip install git+https://github.com/akretion/factur-x
- pip install phonenumbers
script:
@@ -6,22 +6,20 @@
Account Invoice Factur-X
========================
With this module, the PDF customer invoices and refunds generated by the Qweb reporting engine of Odoo will comply with the `ZUGFeRD <http://www.pdflib.com/knowledge-base/pdfa/zugferd-invoices/>`_ standard at *Comfort* level and will soon comply with the Factur-X standard (the new e-invoicing standard for France and Germany which will be released in Q2 2017). The ZUGFeRD standard is a standard based on `CII <http://tfig.unece.org/contents/cross-industry-invoice-cii.htm>`_ (Cross-Industry Invoice) for electronic invoicing. The great idea of the ZUGFeRD standard is to embed an XML file inside the PDF invoice to carry structured information about the invoice. So, with a ZUGFeRD PDF invoice :
With this module, the PDF customer invoices and refunds generated by the Qweb reporting engine of Odoo will comply with the `Factur-X <http://fnfe-mpe.org/factur-x/>`_ standard at *EN 16931* level. The Factur-X standard is the new e-invoicing standard for France and Germany released in Beta version in July 2017. In Germany, it is also known as the `ZUGFeRD 2.0 <http://www.ferd-net.de/aktuelles/meldungen/verabschiedung-zugferd-2.0_profil-en16931.html/>`_ standard. This standard is based on `CII <http://tfig.unece.org/contents/cross-industry-invoice-cii.htm>`_ (Cross-Industry Invoice) for electronic invoicing. The great idea of the ZUGFeRD/Factur-X standard is to embed an XML file inside the PDF invoice to carry structured information about the invoice. So, with a ZUGFeRD/Factur-X PDF invoice:
* no need to change your habbits and those of your customers: you can still send your PDF invoices by email as usual.
* customers equiped with a modern accouting software will be able to import the invoice automatically as supplier invoice by taking advantage of the embedded XML file,
* customers with an ancient accounting software will just open the PDF file with their PDF reader and manually encode the document as supplier invoice in their accounting software.
The PDF invoices generated by this module have been validated by the `ZUGFeRD eInvoice validation portal <https://www.din-zugferd-validation.org>`_ and the validation system says that the invoices have 0 errors.
Installation
============
This module requires the Python library *PyPDF2*. To install it, run:
This module requires the Python library *factur-x* developped by Akretion, which depends on PyPDF2. To install it, run:
.. code::
sudo pip install PyPDF2
sudo pip install factur-x
Configuration
=============
@@ -31,7 +29,7 @@ You just need to do the configuration of the module *base_zugferd* (see the desc
Usage
=====
On the form view of a customer invoice/refund, just click on the *Print* button as usual to get the ZUGFeRD-compliant PDF file.
On the form view of a customer invoice/refund, just click on the *Print* button as usual to get the Factur-X-compliant PDF file.
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
@@ -40,7 +38,7 @@ On the form view of a customer invoice/refund, just click on the *Print* button
Known issues / Roadmap
======================
* Add a hook in the _run_wkhtmltopdf() of the report module to embed the XML file inside the PDF file just after its generation and before it is saved as attachment (and do the same for the report_aeroo module) and try to have the related pull request accepted in Odoo. The current inherit of the get_pdf() is not good because it is not called when selecting the invoice from the attachment. In the meantime, you should always use the *Print Invoice* button to have a ZUGFeRD compliant file.
* for Odoo v11, use the new hooks in the report code to embed the XML file inside the PDF file just after its generation and before it is saved as attachment.
* develop glue modules (or use hasattr() ?) to add to the XML file pieces of information that is carried out by fields defined in other modules such as sale or stock (customer order reference, incoterms, delivery address, etc...).
@@ -11,6 +11,7 @@
'author': 'Akretion,Odoo Community Association (OCA)',
'website': 'http://www.akretion.com',
'depends': ['account_payment_partner', 'base_zugferd', 'base_vat'],
'external_dependencies': {'python': ['PyPDF2', 'lxml']},
'external_dependencies': {'python': ['facturx']},
'data': ['views/res_partner.xml'],
'installable': True,
}
Oops, something went wrong.
ProTip! Use n and p to navigate between commits in a pull request.