Skip to content

Commit

Permalink
Merge PR #795 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Sep 30, 2023
2 parents 5a8e53e + 49d317b commit c751bc8
Show file tree
Hide file tree
Showing 31 changed files with 2,403 additions and 0 deletions.
148 changes: 148 additions & 0 deletions account_invoice_ubl_peppol/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
==========================
Account Invoice UBL PEPPOL
==========================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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/13.0/account_invoice_ubl_peppol
:alt: OCA/edi
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/edi-13-0/edi-13-0-account_invoice_ubl_peppol
: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/13.0
:alt: Try me on Runbot

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

With module `Account Invoice UBL`, invoices are generated according to generic UBL rules.

In Europe, some countries use the PEPPOL 3.0 BIS standard as a more strict subset of UBL.

With this module you can specify some or all of your invoices to be generated and validated
according to this stricter standard.

**Table of contents**

.. contents::
:local:

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

- Go to menu *Invoicing > Configuration > Settings > Invoicing*, under *Electronic Invoices*.

- Formulate a domain for which invoices the dialect should become PEPPOL.
By default it is *[]*, so all UBL invoices will be PEPPOL.
If you want this only for Belgian partners, then you can fill here for example:
`[('partner_id.country_id.code', '=', 'BE')]`
Or you can choose to enable this only for selected partner ids.

- You can configure a default tax to use in case an invoice line has no tax specified.
This is necessary for example in case of an NGO to satisfy business rule
BR-CO-18. Any tax you choose must also have a UNECE tax type (eg. VAT) and tax
category (eg. "Services outside scope of tax") defined.

- You can configure a default unit of measure, of which the UNECE code will be used
in case an invoice line has no unit or product unit. A typical default unit could
be the Odoo 'unit', configured with a UNECE code of UN, XUN or C62. This is to
satisfy rule BR-23.

- Go to menu *Contacts*
Fill the field `coc_registration_number` for your own company's partner record and for
those partners that you want to send e-invoices to.

- Go to menu *Contacts > Configuration > Localization > Countries*
On any country relevant for invoice traffic, configure the correct PEPPOL EAS id.
For the Netherlands, this is for example `0106`, which stands for Dutch chamber of
commerce number.

- Either: make sure that every invoice has a bank account filled in;
Or: make sure that your payment modes have a fixed connection to a bank account.
To do the latter:
Go to menu *Invoicing > Configuration > Management > Payment mode*
Per payment model, set the field `bank_account_link` to `fixed`

Usage
=====

In the invoice form click on button `Send & Print`.

If the invoice matches the configured domain for PEPPOL, the invoice will be generated
and validated according to the stricter PEPPOL 3.0 BIS standard.

The validator on https://test.peppolautoriteit.nl/validate can be used to test the
validity of the generated XML file. There are other online validators around as well.

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

* Currently, the user needs to configure the PEPPOL EAS id for each country. For the Netherlands, this is for example `0106`, which stands for Dutch chamber of commerce number. During review, it was noted that (defaults for) these codes could be mapped automatically upon installation of the module, using a post-init hook or a noupdate=1 XML file. This could still be done, saving the perhaps not so tech- or PEPPOL-savvy user some configuration.
* Currently, this module defines allowed EAS codes from a CSV file. But, other modules could also benefit from this data. So the data could be moved to a separate module in the `community-data-files` repository.
* When adding a delivery partner to an invoice, some PEPPOL warnings arise about `DeliveryParty` that should not be included. This is non blocking but it is nice if we could also add a clause in the module to remove this.
* A unit test should be added that actually verifies against PEPPOL and not only against general UBL. This could consist of:

* Choose a default tax and UoM for this module in `res.config.settings`
* Create an outgoing invoice on the main company to some partner
* On the main company's partner record, choose any EU country, set a VAT number and a CoC number
* On the partner record that is being invoiced, do the same.
* On the `res.country` records that are being used by these partners, configure a valid PEPPOL EAS code.
* On both involved partners, configure a bank account.
* The payment mode that is selected on the invoice should have a `fixed` link to a bank journal.
* On this bank journal, select a bank account of type `IBAN`.
* Create a tax and selecting a UNECE tax category (eg. VAT) and a tax type (eg. S)
* The invoice lines should have this tax defined.
* Validate the invoice, generate the XML, and pass it through the validator.
* This needs to be tested more thoroughly on credit/refund invoices, and purchase invoices.
* Currently, the module fill in the due date under `PaymentTerms`, but we could prefer the Odoo payment terms field if it is filled.
* Upon clicking Print and Send button on invoice, when an error is encountered, the popup will coincide with the `mail.compose` popup. Improve the UI experience to the user here.

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_ubl_peppol%0Aversion:%2013.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
~~~~~~~

* Sunflower IT

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

* Tom Blauwendraat <[email protected]>

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/13.0/account_invoice_ubl_peppol>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions account_invoice_ubl_peppol/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
20 changes: 20 additions & 0 deletions account_invoice_ubl_peppol/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Account Invoice UBL PEPPOL",
"summary": "Generate invoices in PEPPOL 3.0 BIS dialect",
"version": "14.0.1.0.0",
"category": "Accounting & Finance",
"author": "Sunflower IT, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/edi",
"license": "AGPL-3",
"depends": ["account_invoice_ubl", "partner_coc", "base_iban"],
"data": [
"security/ir.model.access.csv",
"views/res_config_settings.xml",
"views/peppol_eas_list.xml",
"data/peppol.eas.list.csv",
"views/res_country.xml",
],
"installable": True,
}
77 changes: 77 additions & 0 deletions account_invoice_ubl_peppol/data/peppol.eas.list.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
id,code,name
account_invoice_ubl_peppol.code_0002,0002,System Information et Repertoire des Entreprise et des Etablissements: SIRENE
account_invoice_ubl_peppol.code_0007,0007,Organisationsnummer (Swedish legal entities)
account_invoice_ubl_peppol.code_0009,0009,SIRET-CODE
account_invoice_ubl_peppol.code_0037,0037,LY-tunnus
account_invoice_ubl_peppol.code_0060,0060,Data Universal Numbering System (D-U-N-S Number)
account_invoice_ubl_peppol.code_0088,0088,EAN Location Code
account_invoice_ubl_peppol.code_0096,0096,DANISH CHAMBER OF COMMERCE Scheme (EDIRA compliant)
account_invoice_ubl_peppol.code_0097,0097,"FTI - Ediforum Italia, (EDIRA compliant)"
account_invoice_ubl_peppol.code_0106,0106,"""Vereniging van Kamers van Koophandel en Fabrieken in Nederland (Association of
Chambers of Commerce and Industry in the Netherlands), Scheme (EDIRA compliant)"""
account_invoice_ubl_peppol.code_0130,0130,Directorates of the European Commission
account_invoice_ubl_peppol.code_0135,0135,SIA Object Identifiers
account_invoice_ubl_peppol.code_0142,0142,SECETI Object Identifiers
account_invoice_ubl_peppol.code_0151,0151,Australian Business Number (ABN) Scheme
account_invoice_ubl_peppol.code_0183,0183,"Numéro d'identification suisse des enterprises (IDE), Swiss Unique Business
Identification Number (UIDB)"
account_invoice_ubl_peppol.code_0184,0184,DIGSTORG
account_invoice_ubl_peppol.code_0190,0190,Dutch Originator's Identification Number
account_invoice_ubl_peppol.code_0191,0191,Centre of Registers and Information Systems of the Ministry of Justice
account_invoice_ubl_peppol.code_0192,0192,Enhetsregisteret ved Bronnoysundregisterne
account_invoice_ubl_peppol.code_0193,0193,UBL.BE party identifier
account_invoice_ubl_peppol.code_0195,0195,Singapore UEN identifier
account_invoice_ubl_peppol.code_0196,0196,Kennitala - Iceland legal id for individuals and legal entities
account_invoice_ubl_peppol.code_0198,0198,ERSTORG
account_invoice_ubl_peppol.code_0199,0199,Legal Entity Identifier (LEI)
account_invoice_ubl_peppol.code_0200,0200,Legal entity code (Lithuania)
account_invoice_ubl_peppol.code_0201,0201,Codice Univoco Unità Organizzativa iPA
account_invoice_ubl_peppol.code_0202,0202,Indirizzo di Posta Elettronica Certificata
account_invoice_ubl_peppol.code_0204,0204,Leitweg-ID
account_invoice_ubl_peppol.code_0208,0208,Numero d'entreprise / ondernemingsnummer / Unternehmensnummer
account_invoice_ubl_peppol.code_0209,0209,GS1 identification keys
account_invoice_ubl_peppol.code_9901,9901,Danish Ministry of the Interior and Health
account_invoice_ubl_peppol.code_9906,9906,Ufficio responsabile gestione partite IVA
account_invoice_ubl_peppol.code_9907,9907,TAX Authority
account_invoice_ubl_peppol.code_9910,9910,Hungary VAT number
account_invoice_ubl_peppol.code_9913,9913,Business Registers Network
account_invoice_ubl_peppol.code_9914,9914,Österreichische Umsatzsteuer-Identifikationsnummer
account_invoice_ubl_peppol.code_9915,9915,"""Österreichisches Verwaltungs bzw. Organisationskennzeichen"""
account_invoice_ubl_peppol.code_9918,9918,"""SOCIETY FOR WORLDWIDE INTERBANK FINANCIAL, TELECOMMUNICATION S.W.I.F.T"""
account_invoice_ubl_peppol.code_9919,9919,Kennziffer des Unternehmensregisters
account_invoice_ubl_peppol.code_9920,9920,Agencia Española de Administración Tributaria
account_invoice_ubl_peppol.code_9922,9922,Andorra VAT number
account_invoice_ubl_peppol.code_9923,9923,Albania VAT number
account_invoice_ubl_peppol.code_9924,9924,Bosnia and Herzegovina VAT number
account_invoice_ubl_peppol.code_9925,9925,Belgium VAT number
account_invoice_ubl_peppol.code_9926,9926,Bulgaria VAT number
account_invoice_ubl_peppol.code_9927,9927,Switzerland VAT number
account_invoice_ubl_peppol.code_9928,9928,Cyprus VAT number
account_invoice_ubl_peppol.code_9929,9929,Czech Republic VAT number
account_invoice_ubl_peppol.code_9930,9930,Germany VAT number
account_invoice_ubl_peppol.code_9931,9931,Estonia VAT number
account_invoice_ubl_peppol.code_9932,9932,United Kingdom VAT number
account_invoice_ubl_peppol.code_9933,9933,Greece VAT number
account_invoice_ubl_peppol.code_9934,9934,Croatia VAT number
account_invoice_ubl_peppol.code_9935,9935,Ireland VAT number
account_invoice_ubl_peppol.code_9936,9936,Liechtenstein VAT number
account_invoice_ubl_peppol.code_9937,9937,Lithuania VAT number
account_invoice_ubl_peppol.code_9938,9938,Luxemburg VAT number
account_invoice_ubl_peppol.code_9939,9939,Latvia VAT number
account_invoice_ubl_peppol.code_9940,9940,Monaco VAT number
account_invoice_ubl_peppol.code_9941,9941,Montenegro VAT number
account_invoice_ubl_peppol.code_9942,9942,"Macedonia, the former Yugoslav Republic of VAT number"
account_invoice_ubl_peppol.code_9943,9943,Malta VAT number
account_invoice_ubl_peppol.code_9944,9944,Netherlands VAT number
account_invoice_ubl_peppol.code_9945,9945,Poland VAT number
account_invoice_ubl_peppol.code_9946,9946,Portugal VAT number
account_invoice_ubl_peppol.code_9947,9947,Romania VAT number
account_invoice_ubl_peppol.code_9948,9948,Serbia VAT number
account_invoice_ubl_peppol.code_9949,9949,Slovenia VAT number
account_invoice_ubl_peppol.code_9950,9950,Slovakia VAT number
account_invoice_ubl_peppol.code_9951,9951,San Marino VAT number
account_invoice_ubl_peppol.code_9952,9952,Turkey VAT number
account_invoice_ubl_peppol.code_9953,9953,Holy See (Vatican City State) VAT number
account_invoice_ubl_peppol.code_9955,9955,Swedish VAT number
account_invoice_ubl_peppol.code_9956,9956,Belgian Crossroad Bank of Enterprises
account_invoice_ubl_peppol.code_9957,9957,French VAT number
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_ubl_email_attachment
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.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_ubl_email_attachment
#: model:ir.model,name:account_invoice_ubl_email_attachment.model_res_company
msgid "Companies"
msgstr ""

#. module: account_invoice_ubl_email_attachment
#: model:ir.model,name:account_invoice_ubl_email_attachment.model_res_config_settings
msgid "Config Settings"
msgstr ""

#. module: account_invoice_ubl_email_attachment
#: model:ir.model,name:account_invoice_ubl_email_attachment.model_mail_template
msgid "Email Templates"
msgstr ""

#. module: account_invoice_ubl_email_attachment
#: model:ir.model.fields,help:account_invoice_ubl_email_attachment.field_res_company__include_ubl_attachment_in_invoice_email
#: model:ir.model.fields,help:account_invoice_ubl_email_attachment.field_res_config_settings__include_ubl_attachment_in_invoice_email
msgid ""
"If active, the UBL Invoice XML file will be included in the attachments when"
" sending the invoice by email."
msgstr ""

#. module: account_invoice_ubl_email_attachment
#: model:ir.model.fields,field_description:account_invoice_ubl_email_attachment.field_res_company__include_ubl_attachment_in_invoice_email
#: model:ir.model.fields,field_description:account_invoice_ubl_email_attachment.field_res_config_settings__include_ubl_attachment_in_invoice_email
msgid "Include UBL XML in Invoice Email"
msgstr ""

#. module: account_invoice_ubl_email_attachment
#: model_terms:ir.ui.view,arch_db:account_invoice_ubl_email_attachment.view_account_config_settings
msgid ""
"Include the UBL XML in the attachments when sending the invoice by email."
msgstr ""

#. module: account_invoice_ubl_email_attachment
#: model:ir.model,name:account_invoice_ubl_email_attachment.model_account_move
msgid "Journal Entries"
msgstr ""
Loading

0 comments on commit c751bc8

Please sign in to comment.