[IMP] accounting: send and print workflow in electronic_invoicing

From saas-16.2, the choice of the format can be made from the partner
form view (for the formats present in `account_edi_ubl_cii` only). And
the attachment are generated during the Send & Print flow.

PR to select the EDI format based on the partner:
https://github.com/odoo/odoo/pull/115934

PR refactoring the Send & Print flow:
https://github.com/odoo/odoo/pull/111857

closes odoo/documentation#4197

X-original-commit: 2e9789e436
Signed-off-by: Castillo Jonathan (jcs) <jcs@odoo.com>
This commit is contained in:
Julien Van Roy 2023-04-13 13:29:54 +00:00 committed by Jonathan
parent 53aa00c871
commit 67ddab9fbc
4 changed files with 78 additions and 38 deletions

View File

@ -20,64 +20,104 @@ Odoo supports, among others, the following formats.
* - Format Name
- Applicability
* - Factur-X (PDF/A-3)
- For French and German companies
* - Peppol BIS Billing 3.0 (UBL)
- For companies whose countries are part of the `EAS list
<https://docs.peppol.eu/poacc/billing/3.0/codelist/eas/>`_
* - E-FFF
- For Belgian companies
* - Factur-X (CII)
- All customers
* - Peppol BIS Billing 3.0
- All customers
* - XRechnung (UBL)
- For German companies
- All customers
* - Fattura PA (IT)
- For Italian companies
- Italian companies
* - CFDI (4.0)
- For Mexican companies
- Mexican companies
* - Peru UBL 2.1
- For Peruvian companies
- Peruvian companies
* - SII IVA Llevanza de libros registro (ES)
- For Spanish companies
- Spanish companies
* - UBL 2.1 (Columbia)
- For Colombian companies
- Colombian companies
* - Egyptian Tax Authority
- For Egyptian companies
- Egyptian companies
* - E-Invoice (IN)
- For Indian companies
- Indian companies
* - NLCIUS (Netherlands)
- For Dutch companies
- Dutch companies
* - EHF 3.0
- For Norwegian companies
- Norwegian companies
* - SG BIS Billing 3.0
- For Singaporean companies
- Singaporean companies
* - A-NZ BIS Billing 3.0
- For Australian/New Zealand companies
- All customers
.. note::
- The **Factur-X (CII)** format enables validation checks on the invoice and generates PDF/A-3
compliant files.
- Every PDF generated by Odoo includes an integrated **Factur-X** XML file.
.. seealso::
:ref:`fiscal_localizations/packages`
:doc:`../../../fiscal_localizations`
.. _e-invoicing/configuration:
Configuration
=============
Go to :menuselection:`Accounting --> Configuration --> Journals --> Customer Invoices --> Advanced
Settings --> Electronic Invoicing` and enable the formats you need for this journal.
By default, the format available in the :ref:`send window <e-invoicing/generation>` depends on your
customer's country.
.. image:: electronic_invoicing/formats.png
:align: center
:alt: Select the EDI format you need
You can define a specific e-invoicing format for each customer. To do so, go to
:menuselection:`Accounting --> Customers --> Customers`, open the customer form, go to the
:guilabel:`Accounting` tab and select the appropriate format.
Once an electronic invoicing format is enabled, XML documents are generated when clicking on
:guilabel:`Confirm` in documents such as invoices, credit notes, etc. These documents are either
visible in the attachment section, or embedded in the PDF.
.. image:: electronic_invoicing/customer-form.png
:alt: Select an EDI format for a specific customer
.. note::
- For E-FFF, the xml file only appears after having generated the PDF (:guilabel:`Print` or
:guilabel:`Send & Print` button), since the PDF needs to be embedded inside the xml.
- Every PDF generated from Odoo contains a :guilabel:`Factur-X` XML file (for interoperability purpose).
For German and French companies, the option :guilabel:`Factur-X (PDF/A-3)` in addition enables
validation checks on the invoice and generates a PDF/A-3 compliant file, required by plaftorms like Chorus Pro.
- The formats available depend on the country registered in your company's :guilabel:`General
Information`.
- Odoo supports the **Peppol BIS Billing 3.0** format that can be used via existing access
points.
Peppol formats
--------------
Use the fields :guilabel:`Peppol e-address (EAS)` and :guilabel:`Peppol Endpoint` to identify the
recipient in the Peppol Network.
.. seealso::
`Peppol BIS Billing 3.0 - Electronic Address Scheme (EAS) code list
<https://docs.peppol.eu/poacc/billing/3.0/codelist/eas/>`_
.. example::
.. list-table::
:header-rows: 1
* - Partner's country
- Peppol e-address (EAS)
- Peppol Endpoint
* - Luxembourg
- 9938 - Luxemburg VAT number
- a valid Luxemburgish VAT number
* - Netherlands
- 0190 - Dutch Originator's Identification Number
- a valid OIN number
* - Belgium
- 9925 - Belgium VAT number
- a valid Belgian VAT number
National electronic invoicing
-----------------------------
Depending on your company's country (e.g., :doc:`Italy <../../../fiscal_localizations/italy>`,
:doc:`Spain <../../../fiscal_localizations/spain>`, :doc:`Mexico
<../../../fiscal_localizations/mexico>`, etc.), you may be required to issue e-invoicing documents in
a specific format for all your invoices. In this case, you can define a default e-invoicing format
for your sales journal.
To do so, go to :menuselection:`Accounting --> Configuration --> Journals`, open your sales journal,
go to the :guilabel:`Advanced Settings` tab, and enable the formats you need for this journal.
.. _e-invoicing/generation:
E-invoices generation
=====================
From a confirmed invoice, click :guilabel:`Send & Print` to open the send window. Check the
e-invoicing option to generate and attach the e-invoice file.
.. image:: electronic_invoicing/send-window.png
:alt: The Peppol option is checked and an e-invoicing XML file is attached to the email.

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB