Skip to content

Commit fbac62a

Browse files
committed
Merge PR #948 into 17.0
Signed-off-by alexis-via
2 parents fa79b1b + 212437d commit fbac62a

33 files changed

+3009
-0
lines changed

account_invoice_facturx/README.rst

+129
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
========================
2+
Account Invoice Factur-X
3+
========================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:aaec5af2acb0aa3df5c8683d2c116258fb47862a1c11cdd5974c6a3e08bb6925
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi-lightgray.png?logo=github
20+
:target: https://github.com/OCA/edi/tree/17.0/account_invoice_facturx
21+
:alt: OCA/edi
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/edi-17-0/edi-17-0-account_invoice_facturx
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/edi&target_branch=17.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
With this module, the PDF customer invoices and refunds generated by the
32+
Qweb reporting engine of Odoo will comply with the
33+
`Factur-X <http://fnfe-mpe.org/factur-x/>`__ standard. The Factur-X
34+
standard is an e-invoicing standard for France and Germany released on
35+
December 31st 2017. In Germany, it is also known as the `ZUGFeRD
36+
2.0 <http://www.ferd-net.de/aktuelles/meldungen/verabschiedung-zugferd-2.0_profil-en16931.html/>`__
37+
standard. This standard is based on
38+
`CII <http://tfig.unece.org/contents/cross-industry-invoice-cii.htm>`__
39+
(Cross-Industry Invoice) for electronic invoicing. The great idea of the
40+
ZUGFeRD/Factur-X standard is to embed an XML file inside the PDF invoice
41+
to carry structured information about the invoice. So, with a
42+
ZUGFeRD/Factur-X PDF invoice:
43+
44+
- no need to change your habbits and those of your customers: you can
45+
still send your PDF invoices by email as usual.
46+
- customers equiped with a modern accouting software will be able to
47+
import the invoice automatically as supplier invoice by taking
48+
advantage of the embedded XML file,
49+
- customers with an ancient accounting software will just open the PDF
50+
file with their PDF reader and manually encode the document as
51+
supplier invoice in their accounting software.
52+
53+
**Table of contents**
54+
55+
.. contents::
56+
:local:
57+
58+
Installation
59+
============
60+
61+
This module requires a recent version of the Python library
62+
`factur-x <https://github.com/akretion/factur-x>`__ developped by
63+
Akretion. Note that the factur-x library depends on PyPDF2 for the
64+
low-level PDF manipulation. To install it, run:
65+
66+
::
67+
68+
sudo pip3 install --upgrade factur-x
69+
70+
Configuration
71+
=============
72+
73+
In the menu *Invoicing > Configuration > Settings*, check these options:
74+
75+
- *XML Format embedded in PDF invoice*: if you want to generate
76+
Factur-X invoices, this option must be set to *Factur-X (CII)*
77+
- the *Factur-X Level*: unless you have a good reason, you should keep
78+
the default value *EN 16931 (Comfort)*
79+
- *Factur-X Refund Type*: choose the type of the XML invoice for
80+
customer refunds (keep the default value if you are not familiar with
81+
this setting).
82+
83+
Bug Tracker
84+
===========
85+
86+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/edi/issues>`_.
87+
In case of trouble, please check there if your issue has already been reported.
88+
If you spotted it first, help us to smash it by providing a detailed and welcomed
89+
`feedback <https://github.com/OCA/edi/issues/new?body=module:%20account_invoice_facturx%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
90+
91+
Do not contact contributors directly about support or help with technical issues.
92+
93+
Credits
94+
=======
95+
96+
Authors
97+
-------
98+
99+
* Akretion
100+
101+
Contributors
102+
------------
103+
104+
- Alexis de Lattre <alexis.delattre@akretion.com>
105+
106+
Maintainers
107+
-----------
108+
109+
This module is maintained by the OCA.
110+
111+
.. image:: https://odoo-community.org/logo.png
112+
:alt: Odoo Community Association
113+
:target: https://odoo-community.org
114+
115+
OCA, or the Odoo Community Association, is a nonprofit organization whose
116+
mission is to support the collaborative development of Odoo features and
117+
promote its widespread use.
118+
119+
.. |maintainer-alexis-via| image:: https://github.com/alexis-via.png?size=40px
120+
:target: https://github.com/alexis-via
121+
:alt: alexis-via
122+
123+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
124+
125+
|maintainer-alexis-via|
126+
127+
This module is part of the `OCA/edi <https://github.com/OCA/edi/tree/17.0/account_invoice_facturx>`_ project on GitHub.
128+
129+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

account_invoice_facturx/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from . import models
2+
from . import wizards
3+
from .hooks import set_xml_format_in_pdf_invoice_to_facturx
+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright 2016-2022 Akretion France (http://www.akretion.com/)
2+
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
3+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
4+
5+
{
6+
"name": "Account Invoice Factur-X",
7+
"version": "17.0.1.0.0",
8+
"category": "Invoicing Management",
9+
"license": "AGPL-3",
10+
"summary": "Generate Factur-X/ZUGFeRD customer invoices",
11+
"author": "Akretion,Odoo Community Association (OCA)",
12+
"maintainers": ["alexis-via"],
13+
"website": "https://github.com/OCA/edi",
14+
"depends": [
15+
"account_einvoice_generate",
16+
"account_payment_partner",
17+
"base_facturx",
18+
"base_vat",
19+
],
20+
"external_dependencies": {"python": ["factur-x"]},
21+
"data": [
22+
"views/res_partner.xml",
23+
"views/account_move.xml",
24+
"views/res_config_settings.xml",
25+
],
26+
"post_init_hook": "set_xml_format_in_pdf_invoice_to_facturx",
27+
"installable": True,
28+
}

account_invoice_facturx/hooks.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright 2018-2022 Akretion France (http://www.akretion.com/)
2+
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
3+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
4+
5+
6+
def set_xml_format_in_pdf_invoice_to_facturx(env):
7+
companies = env["res.company"].search(
8+
[("xml_format_in_pdf_invoice", "in", (False, "none"))]
9+
)
10+
companies.write({"xml_format_in_pdf_invoice": "factur-x"})
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * account_invoice_factur-x
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 10.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"Last-Translator: <>\n"
10+
"Language-Team: \n"
11+
"MIME-Version: 1.0\n"
12+
"Content-Type: text/plain; charset=UTF-8\n"
13+
"Content-Transfer-Encoding: \n"
14+
"Plural-Forms: \n"
15+
16+
#. module: account_invoice_factur-x
17+
#: code:addons/account_invoice_factur-x/models/account_invoice.py:751
18+
#, python-format
19+
msgid "%s: %s %s dated %s"
20+
msgstr ""
21+
22+
#. module: account_invoice_factur-x
23+
#: selection:res.company,facturx_level:0
24+
msgid "Basic"
25+
msgstr ""
26+
27+
#. module: account_invoice_factur-x
28+
#: selection:res.company,facturx_level:0
29+
msgid "Basic without lines"
30+
msgstr ""
31+
32+
#. module: account_invoice_factur-x
33+
#: model:ir.model,name:account_invoice_factur-x.model_res_company
34+
msgid "Companies"
35+
msgstr ""
36+
37+
#. module: account_invoice_factur-x
38+
#: code:addons/account_invoice_factur-x/models/account_invoice.py:50
39+
#, python-format
40+
msgid "Country is not set on partner '%s'. In the Factur-X standard, the country is required for buyer and seller."
41+
msgstr ""
42+
43+
#. module: account_invoice_factur-x
44+
#: selection:res.company,facturx_level:0
45+
msgid "EN 16931 (Comfort)"
46+
msgstr ""
47+
48+
#. module: account_invoice_factur-x
49+
#: code:addons/account_invoice_factur-x/models/account_invoice.py:750
50+
#, python-format
51+
msgid "Factur-X"
52+
msgstr ""
53+
54+
#. module: account_invoice_factur-x
55+
#: model:ir.ui.view,arch_db:account_invoice_factur-x.view_account_config_settings
56+
msgid "Factur-X Invoices"
57+
msgstr ""
58+
59+
#. module: account_invoice_factur-x
60+
#: model:ir.model.fields,field_description:account_invoice_factur-x.field_account_config_settings_facturx_level
61+
#: model:ir.model.fields,field_description:account_invoice_factur-x.field_res_company_facturx_level
62+
msgid "Factur-X Level"
63+
msgstr ""
64+
65+
#. module: account_invoice_factur-x
66+
#: model:ir.model.fields,field_description:account_invoice_factur-x.field_res_company_facturx_logo
67+
msgid "Factur-X Logo"
68+
msgstr ""
69+
70+
#. module: account_invoice_factur-x
71+
#: model:ir.model.fields,field_description:account_invoice_factur-x.field_account_config_settings_facturx_refund_type
72+
#: model:ir.model.fields,field_description:account_invoice_factur-x.field_res_company_facturx_refund_type
73+
msgid "Factur-X Refund Type"
74+
msgstr ""
75+
76+
#. module: account_invoice_factur-x
77+
#: code:addons/account_invoice_factur-x/models/account_invoice.py:747
78+
#: model:ir.model,name:account_invoice_factur-x.model_account_invoice
79+
#, python-format
80+
msgid "Invoice"
81+
msgstr ""
82+
83+
#. module: account_invoice_factur-x
84+
#: model:ir.model.fields,help:account_invoice_factur-x.field_res_company_facturx_logo
85+
msgid "Logo to include in the visible part of Factur-X invoices"
86+
msgstr ""
87+
88+
#. module: account_invoice_factur-x
89+
#: selection:res.company,facturx_level:0
90+
msgid "Minimum"
91+
msgstr ""
92+
93+
#. module: account_invoice_factur-x
94+
#: code:addons/account_invoice_factur-x/models/account_invoice.py:374
95+
#: code:addons/account_invoice_factur-x/models/account_invoice.py:645
96+
#, python-format
97+
msgid "Missing UNECE Tax Category on tax '%s'"
98+
msgstr ""
99+
100+
#. module: account_invoice_factur-x
101+
#: code:addons/account_invoice_factur-x/models/account_invoice.py:371
102+
#: code:addons/account_invoice_factur-x/models/account_invoice.py:638
103+
#, python-format
104+
msgid "Missing UNECE Tax Type on tax '%s'"
105+
msgstr ""
106+
107+
#. module: account_invoice_factur-x
108+
#: code:addons/account_invoice_factur-x/models/account_invoice.py:444
109+
#, python-format
110+
msgid "Missing UNECE code on payment export type '%s'"
111+
msgstr ""
112+
113+
#. module: account_invoice_factur-x
114+
#: code:addons/account_invoice_factur-x/models/account_invoice.py:346
115+
#, python-format
116+
msgid "No specific payment term selected"
117+
msgstr ""
118+
119+
#. module: account_invoice_factur-x
120+
#: code:addons/account_invoice_factur-x/models/account_invoice.py:747
121+
#, python-format
122+
msgid "Refund"
123+
msgstr ""
124+
125+
#. module: account_invoice_factur-x
126+
#: model:ir.model,name:account_invoice_factur-x.model_report
127+
msgid "Report"
128+
msgstr ""
129+
130+
#. module: account_invoice_factur-x
131+
#: code:addons/account_invoice_factur-x/models/account_invoice.py:555
132+
#, python-format
133+
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."
134+
msgstr ""
135+
136+
#. module: account_invoice_factur-x
137+
#: selection:res.company,facturx_refund_type:0
138+
msgid "Type 380 with negative amounts"
139+
msgstr ""
140+
141+
#. module: account_invoice_factur-x
142+
#: selection:res.company,facturx_refund_type:0
143+
msgid "Type 381 with positive amounts"
144+
msgstr ""
145+
146+
#. module: account_invoice_factur-x
147+
#: model:ir.model.fields,help:account_invoice_factur-x.field_account_config_settings_facturx_level
148+
#: model:ir.model.fields,help:account_invoice_factur-x.field_res_company_facturx_level
149+
msgid "Unless if you have a good reason, you should always select 'EN 16931 (Comfort)', which is the default value."
150+
msgstr ""
151+
152+
#. module: account_invoice_factur-x
153+
#: code:addons/account_invoice_factur-x/models/account_invoice.py:290
154+
#, python-format
155+
msgid "Wire transfer"
156+
msgstr ""
157+
158+
#. module: account_invoice_factur-x
159+
#: model:ir.model,name:account_invoice_factur-x.model_account_config_settings
160+
msgid "account.config.settings"
161+
msgstr ""
162+

0 commit comments

Comments
 (0)