Skip to content
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

[MIG] account_invoice_factur-x: Migration to 12.0 #79

Closed
wants to merge 45 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
b6fae38
Rename account_invoice_zugferd to account_invoice_factur-x
alexis-via Feb 22, 2017
ca5acb2
Fix field name on invoice
alexis-via Mar 6, 2017
573d7bc
Stop using precision_get('Account') (this decimal precision doesn't e…
alexis-via Mar 17, 2017
85e84e5
Update test suite
alexis-via Jun 1, 2017
bba66f1
account_invoice_factur-x: Add support for Factur-X standard instead o…
alexis-via Jul 9, 2017
aa2e42e
Adapt test suite
alexis-via Jul 10, 2017
52ba790
Add Factur-X_extension_schema.xmp for PDF metadata of Factur-X invoices
alexis-via Jul 10, 2017
684d8b5
account_invoice_factur-x: TestIndicator not in new XML
alexis-via Jul 18, 2017
abf3284
Improve XML for Factur-X
alexis-via Jul 28, 2017
9abcd60
Remove bank name tag, not allowed in Factur-X
alexis-via Aug 9, 2017
25a0038
Add first support for the import of Factur-X invoices
alexis-via Aug 10, 2017
3160679
Add support for allowance and charges on Factur-X invoice import
alexis-via Aug 11, 2017
86da30f
Add support for 'DueDateTypeCode' on Factur-X invoice generation
alexis-via Aug 13, 2017
15b3fc7
account_invoice_factur-x: now generate refunds with document type = 3…
alexis-via Aug 15, 2017
1d552b8
Start to use the new factur-x lib
alexis-via Aug 22, 2017
80c114b
Improve + modularize generation of UBL (up-port from v8 PR)
alexis-via Aug 23, 2017
ed79aaa
Finalise the use of the FacturX lib
alexis-via Sep 6, 2017
bc4ec4a
Adapt to final version of factur-x lib
alexis-via Sep 10, 2017
d48902f
Adapt to latest changes in the agreement_* modules
alexis-via Sep 10, 2017
e9d0935
account_invoice_factur-x: add XML tags for sepa direct debit
alexis-via Sep 30, 2017
801335f
FIX Factur-x invoice generation with Qweb
alexis-via Oct 4, 2017
5c67553
account_invoice_factur-x use factur-x lib instead of PyPDF2
alexis-via Oct 13, 2017
b78e17a
Add logging in test to try to understand where it stalls on Travis
alexis-via Oct 14, 2017
8b82318
account_invoice_factur-x: Replace full test that doesn't work on Trav…
alexis-via Oct 14, 2017
cba57bf
Update README of Factur-X modules
alexis-via Oct 14, 2017
190a946
[10.0] restore get_pdf() in tests (#31)
Oct 15, 2017
4138ecf
account_invoice_factur-x* : use factur-x lib v0.2 (#32)
Nov 7, 2017
313af0e
Factur-X invoice generation: level is now configurable
alexis-via Nov 15, 2017
62af58f
FIX lang in XML translatable labels
alexis-via Nov 17, 2017
25557c7
FIX official Factur-X XSD (patch sent to FNFE-MPE for upstream correc…
alexis-via Nov 17, 2017
e52d71e
Add module account_e-invoice_generate to ensure compatibility for XML…
alexis-via Jan 17, 2018
c98916b
Add support for Factur-X logos to include in the visual part of Factu…
alexis-via Jan 22, 2018
6e988ce
OCA Transbot updated translations from Transifex
oca-transbot Feb 10, 2018
50da78d
OCA Transbot updated translations from Transifex
oca-transbot Mar 31, 2018
33ad888
acc_type on res.partner.bank is not stored any more, cf https://githu…
alexis-via May 2, 2018
d89c891
[FIX] in v9+, partner.name is NOT a required field any more
alexis-via May 14, 2018
752da68
OCA Transbot updated translations from Transifex
oca-transbot May 19, 2018
6c93cda
[10.0] Several fixes + import invoices with VAT in a company that can…
Jul 31, 2018
6a1c882
[UPD] Update account_invoice_factur-x.pot
oca-travis Jul 31, 2018
a991514
[FIX] Remove 'CalculationPercent' and 'BasisAmount' which are only av…
alexis-via Aug 1, 2018
01f7e88
[UPD] Update account_invoice_factur-x.pot
oca-travis Aug 18, 2018
9be9784
Translated using Weblate (French)
Billolha Oct 3, 2018
6f07688
Update for Factur-X specs 1.3
alexis-via Oct 30, 2018
a411840
Update translation files
oca-transbot Nov 24, 2018
8fc9d9d
[MIG] account_invoice_factur-x: Migration to 12.0
joshuajan Jan 5, 2019
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
109 changes: 109 additions & 0 deletions account_invoice_factur-x/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
========================
Account Invoice Factur-X
========================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi-lightgray.png?logo=github
:target: https://github.com/OCA/edi/tree/12.0/account_invoice_factur-x
:alt: OCA/edi
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/edi-12-0/edi-12-0-account_invoice_factur-x
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/226/12.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

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.

**Table of contents**

.. contents::
:local:

Installation
============

This module requires the Python library *factur-x* with **version >= 0.3** developped by Akretion. Note that the factur-x library depends on PyPDF2 for the low-level PDF manipulation. To install it, run:

.. code::

sudo pip install factur-x

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

In the menu *Accounting > Configuration > Settings*, check these options:

* *XML Format embedded in PDF invoice*: if you want to generate Factur-X invoices, this option must be set to *Factur-X (CII)*
* the *Factur-X Level*: unless you have a good reason, you should keep the default value *EN 16931 (Comfort)*
* *Factur-X Refund Type*: choose the type of the XML invoice for customer refunds.

Usage
=====

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.

Known issues / Roadmap
======================

* 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...).

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/edi/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 <https://github.com/OCA/edi/issues/new?body=module:%20account_invoice_factur-x%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Akretion

Contributors
~~~~~~~~~~~~

* Firstname Lastname <email.address@example.org> (optional company website url)
* Alexis de Lattre <alexis.delattre@akretion.com>
* Shine IT <contact@openerp.cn>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

This module is part of the `OCA/edi <https://github.com/OCA/edi/tree/12.0/account_invoice_factur-x>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions account_invoice_factur-x/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from .post_install import set_xml_format_in_pdf_invoice_to_facturx
27 changes: 27 additions & 0 deletions account_invoice_factur-x/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# © 2016-2018 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
'name': 'Account Invoice Factur-X',
'version': '12.0.1.0.0',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': 'Generate Factur-X/ZUGFeRD customer invoices',
'author': 'Akretion, Odoo Community Association (OCA)',
'website': 'http://www.akretion.com',
'depends': [
'account_e-invoice_generate',
'account_payment_partner',
'base_zugferd',
'base_vat',
'account_facturx',
],
'external_dependencies': {'python': ['facturx']},
'data': [
'views/res_partner.xml',
'views/res_config_settings.xml',
'views/report_invoice.xml',
],
'post_init_hook': 'set_xml_format_in_pdf_invoice_to_facturx',
'installable': True,
}
162 changes: 162 additions & 0 deletions account_invoice_factur-x/i18n/account_invoice_factur-x.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_factur-x
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: account_invoice_factur-x
#: code:addons/account_invoice_factur-x/models/account_invoice.py:751
#, python-format
msgid "%s: %s %s dated %s"
msgstr ""

#. module: account_invoice_factur-x
#: selection:res.company,facturx_level:0
msgid "Basic"
msgstr ""

#. module: account_invoice_factur-x
#: selection:res.company,facturx_level:0
msgid "Basic without lines"
msgstr ""

#. module: account_invoice_factur-x
#: model:ir.model,name:account_invoice_factur-x.model_res_company
msgid "Companies"
msgstr ""

#. module: account_invoice_factur-x
#: code:addons/account_invoice_factur-x/models/account_invoice.py:50
#, python-format
msgid "Country is not set on partner '%s'. In the Factur-X standard, the country is required for buyer and seller."
msgstr ""

#. module: account_invoice_factur-x
#: selection:res.company,facturx_level:0
msgid "EN 16931 (Comfort)"
msgstr ""

#. module: account_invoice_factur-x
#: code:addons/account_invoice_factur-x/models/account_invoice.py:750
#, python-format
msgid "Factur-X"
msgstr ""

#. module: account_invoice_factur-x
#: model:ir.ui.view,arch_db:account_invoice_factur-x.view_account_config_settings
msgid "Factur-X Invoices"
msgstr ""

#. module: account_invoice_factur-x
#: model:ir.model.fields,field_description:account_invoice_factur-x.field_account_config_settings_facturx_level
#: model:ir.model.fields,field_description:account_invoice_factur-x.field_res_company_facturx_level
msgid "Factur-X Level"
msgstr ""

#. module: account_invoice_factur-x
#: model:ir.model.fields,field_description:account_invoice_factur-x.field_res_company_facturx_logo
msgid "Factur-X Logo"
msgstr ""

#. module: account_invoice_factur-x
#: model:ir.model.fields,field_description:account_invoice_factur-x.field_account_config_settings_facturx_refund_type
#: model:ir.model.fields,field_description:account_invoice_factur-x.field_res_company_facturx_refund_type
msgid "Factur-X Refund Type"
msgstr ""

#. module: account_invoice_factur-x
#: code:addons/account_invoice_factur-x/models/account_invoice.py:747
#: model:ir.model,name:account_invoice_factur-x.model_account_invoice
#, python-format
msgid "Invoice"
msgstr ""

#. module: account_invoice_factur-x
#: model:ir.model.fields,help:account_invoice_factur-x.field_res_company_facturx_logo
msgid "Logo to include in the visible part of Factur-X invoices"
msgstr ""

#. module: account_invoice_factur-x
#: selection:res.company,facturx_level:0
msgid "Minimum"
msgstr ""

#. module: account_invoice_factur-x
#: code:addons/account_invoice_factur-x/models/account_invoice.py:374
#: code:addons/account_invoice_factur-x/models/account_invoice.py:645
#, python-format
msgid "Missing UNECE Tax Category on tax '%s'"
msgstr ""

#. module: account_invoice_factur-x
#: code:addons/account_invoice_factur-x/models/account_invoice.py:371
#: code:addons/account_invoice_factur-x/models/account_invoice.py:638
#, python-format
msgid "Missing UNECE Tax Type on tax '%s'"
msgstr ""

#. module: account_invoice_factur-x
#: code:addons/account_invoice_factur-x/models/account_invoice.py:444
#, python-format
msgid "Missing UNECE code on payment export type '%s'"
msgstr ""

#. module: account_invoice_factur-x
#: code:addons/account_invoice_factur-x/models/account_invoice.py:346
#, python-format
msgid "No specific payment term selected"
msgstr ""

#. module: account_invoice_factur-x
#: code:addons/account_invoice_factur-x/models/account_invoice.py:747
#, python-format
msgid "Refund"
msgstr ""

#. module: account_invoice_factur-x
#: model:ir.model,name:account_invoice_factur-x.model_report
msgid "Report"
msgstr ""

#. module: account_invoice_factur-x
#: code:addons/account_invoice_factur-x/models/account_invoice.py:555
#, python-format
msgid "The Factur-X standard specify that unit prices can't be negative. The unit price of line '%s' is negative. You should generate a customer refund for that line."
msgstr ""

#. module: account_invoice_factur-x
#: selection:res.company,facturx_refund_type:0
msgid "Type 380 with negative amounts"
msgstr ""

#. module: account_invoice_factur-x
#: selection:res.company,facturx_refund_type:0
msgid "Type 381 with positive amounts"
msgstr ""

#. module: account_invoice_factur-x
#: model:ir.model.fields,help:account_invoice_factur-x.field_account_config_settings_facturx_level
#: model:ir.model.fields,help:account_invoice_factur-x.field_res_company_facturx_level
msgid "Unless if you have a good reason, you should always select 'EN 16931 (Comfort)', which is the default value."
msgstr ""

#. module: account_invoice_factur-x
#: code:addons/account_invoice_factur-x/models/account_invoice.py:290
#, python-format
msgid "Wire transfer"
msgstr ""

#. module: account_invoice_factur-x
#: model:ir.model,name:account_invoice_factur-x.model_account_config_settings
msgid "account.config.settings"
msgstr ""

Loading