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

[13.0][MIG] account_invoice_import_facturx: Migration to 13.0 #1093

Open
wants to merge 21 commits into
base: 13.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
94 changes: 94 additions & 0 deletions account_invoice_import_facturx/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
===============================
Account Invoice Import Factur-X
===============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e7819c7992c757e3e2d3b54f969034176ab6e6320c073c005fb5390c3a47f567
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/14.0/account_invoice_import_facturx
:alt: OCA/edi
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/edi-14-0/edi-14-0-account_invoice_import_facturx
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/edi&target_branch=14.0
:alt: Try me on Runboat

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

This module is an extension of the module *account_invoice_import*: it adds the ability to import Factur-X 1.0 (i.e. ZUGFeRD 2.x) and ZUGFeRD 1.0 invoices. The `Factur-X <http://fnfe-mpe.org/factur-x/>`_ standard is based on `CII <http://tfig.unece.org/contents/cross-industry-invoice-cii.htm>`_ (Cross-Industry Invoice) for electronic invoicing. A Factur-X invoice is a PDF invoice with an embedded XML file in CII format that carries structured information about the invoice.

**Table of contents**

.. contents::
:local:

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

This module requires the Python library `factur-x <https://github.com/akretion/factur-x>`__ developped by Akretion. To install it, run:

.. code::

sudo pip3 install --upgrade factur-x

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 to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/edi/issues/new?body=module:%20account_invoice_import_facturx%0Aversion:%2014.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
~~~~~~~~~~~~

* Alexis de Lattre <[email protected]>
* Heliconia Solutions <[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.

.. |maintainer-alexis-via| image:: https://github.com/alexis-via.png?size=40px
:target: https://github.com/alexis-via
:alt: alexis-via

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-alexis-via|

This module is part of the `OCA/edi <https://github.com/OCA/edi/tree/14.0/account_invoice_import_facturx>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions account_invoice_import_facturx/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import wizard
19 changes: 19 additions & 0 deletions account_invoice_import_facturx/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2015-2021 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Account Invoice Import Factur-X",
"version": "13.0.1.0.0",
"category": "Invoicing Management",
"license": "AGPL-3",
"summary": "Import Factur-X/ZUGFeRD supplier invoices/refunds",
"author": "Akretion,Odoo Community Association (OCA)",
"maintainers": ["alexis-via"],
"website": "https://github.com/OCA/edi",
"depends": ["account_invoice_import", "base_facturx"],
"external_dependencies": {"python": ["factur-x"]},
"data": ["wizard/account_invoice_import_view.xml"],
"demo": ["demo/demo_data.xml"],
"installable": True,
}
183 changes: 183 additions & 0 deletions account_invoice_import_facturx/demo/demo_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">

<record id="charge_account" model="account.account">
<field name="code">606FACTURX</field>
<field name="name">Charge account Factur-X</field>
<field name="user_type_id" ref="account.data_account_type_expenses" />
</record>

<record id="jolie_boutique" model="res.partner">
<field name="name">Ma jolie boutique</field>
<field name="is_company" eval="True" />
<field name="supplier_rank">1</field>
<field name="customer_rank">0</field>
<field name="street">35 rue de la république</field>
<field name="zip">69001</field>
<field name="city">Lyon</field>
<field name="country_id" ref="base.fr" />
<field name="vat">FR11999999998</field>
</record>

<record id="fr_vat_purchase_20" model="account.tax">
<field name="name">FR VAT purchase 20.0%</field>
<field name="description">FR-VAT-buy-20.0</field>
<field name="type_tax_use">purchase</field>
<field name="amount">20</field>
<field name="amount_type">percent</field>
<field name="unece_type_id" ref="account_tax_unece.tax_type_vat" />
<field name="unece_categ_id" ref="account_tax_unece.tax_categ_s" />
</record>

<record id="jolie_boutique_import_config" model="account.invoice.import.config">
<field name="name">Jolie Boutique</field>
<field name="partner_id" ref="jolie_boutique" />
<field name="invoice_line_method">1line_no_product</field>
<field name="account_id" ref="charge_account" />
<field
name="tax_ids"
eval="[(4, ref('account_invoice_import_facturx.fr_vat_purchase_20'))]"
/>
</record>

<record id="lieferant" model="res.partner">
<field name="name">Lieferant GmbH</field>
<field name="is_company" eval="True" />
<field name="supplier_rank">1</field>
<field name="customer_rank">0</field>
<field name="street">Lieferantenstraße 20</field>
<field name="zip">80333</field>
<field name="city">München</field>
<field name="country_id" ref="base.de" />
</record>

<record id="lieferant_import_config" model="account.invoice.import.config">
<field name="name">Lieferant</field>
<field name="partner_id" ref="lieferant" />
<field name="invoice_line_method">nline_no_product</field>
<field name="account_id" ref="charge_account" />
</record>


<record id="mvm_musterhafter" model="res.partner">
<field name="name">MVM Musterhafter
Versicherungsverein Musterstadt a.G.</field>
<field name="is_company" eval="True" />
<field name="supplier_rank">1</field>
<field name="customer_rank">0</field>
<field name="street">Musterstr. 12</field>
<field name="zip">12345</field>
<field name="city">Musterstadt</field>
<field name="country_id" ref="base.de" />
</record>

<record id="mvm_musterhafter_import_config" model="account.invoice.import.config">
<field name="name">MVM Musterhafter</field>
<field name="partner_id" ref="mvm_musterhafter" />
<field name="invoice_line_method">nline_no_product</field>
<field name="account_id" ref="charge_account" />
</record>


<record id="musterlieferant" model="res.partner">
<field name="name">MUSTERLIEFERANT GMBH</field>
<field name="is_company" eval="True" />
<field name="supplier_rank">1</field>
<field name="customer_rank">0</field>
<field name="email">[email protected]</field>
<field name="street">BAHNHOFSTRASSE 99</field>
<field name="zip">99199</field>
<field name="city">MUSTERHAUSEN</field>
<field name="country_id" ref="base.de" />
</record>

<record id="musterlieferant_import_config" model="account.invoice.import.config">
<field name="name">MUSTERLIEFERANT</field>
<field name="partner_id" ref="musterlieferant" />
<field name="invoice_line_method">nline_no_product</field>
<field name="account_id" ref="charge_account" />
</record>


<record id="de_vat_purchase_19" model="account.tax">
<field name="name">German VAT purchase 19.0%</field>
<field name="description">DE-VAT-buy-19.0</field>
<field name="type_tax_use">purchase</field>
<field name="amount">19</field>
<field name="amount_type">percent</field>
<field name="unece_type_id" ref="account_tax_unece.tax_type_vat" />
<field name="unece_categ_id" ref="account_tax_unece.tax_categ_s" />
</record>

<record id="de_vat_purchase_7" model="account.tax">
<field name="name">German VAT purchase 7.0%</field>
<field name="description">DE-VAT-buy-7.0</field>
<field name="type_tax_use">purchase</field>
<field name="amount">7</field>
<field name="amount_type">percent</field>
<field name="unece_type_id" ref="account_tax_unece.tax_type_vat" />
<field name="unece_categ_id" ref="account_tax_unece.tax_categ_s" />
</record>

<record id="de_insurance_purchase_19" model="account.tax">
<field name="name">German Insurance purchase 19.0%</field>
<field name="description">DE-INSURANCE-buy-19.0</field>
<field name="type_tax_use">purchase</field>
<field name="amount">19</field>
<field name="amount_type">percent</field>
<field name="unece_type_id" ref="base_facturx.tax_type_zf_insurance_tax" />
<field name="unece_categ_id" ref="account_tax_unece.tax_categ_s" />
</record>

<record id="de_insurance_purchase_16_34" model="account.tax">
<field name="name">German Insurance purchase 16.34%</field>
<field name="description">DE-INSURANCE-buy-16.34</field>
<field name="type_tax_use">purchase</field>
<field name="amount">16.34</field>
<field name="amount_type">percent</field>
<field name="unece_type_id" ref="base_facturx.tax_type_zf_insurance_tax" />
<field name="unece_categ_id" ref="account_tax_unece.tax_categ_s" />
</record>

<record id="test_noline" model="res.partner">
<field name="name">Test Supplier (noline)</field>
<field name="is_company" eval="True" />
<field name="supplier_rank">1</field>
<field name="customer_rank">0</field>
<field name="country_id" ref="base.fr" />
<field name="vat">FR11123456782</field>
</record>

<record id="test_noline_import_config" model="account.invoice.import.config">
<field name="name">Test noline</field>
<field name="partner_id" ref="test_noline" />
<field name="invoice_line_method">1line_no_product</field>
<field name="account_id" ref="charge_account" />
<field
name="tax_ids"
eval="[(4, ref('account_invoice_import_facturx.fr_vat_purchase_20'))]"
/>
</record>

<record id="test_line" model="res.partner">
<field name="name">Test Supplier (lines)</field>
<field name="is_company" eval="True" />
<field name="supplier_rank">1</field>
<field name="customer_rank">0</field>
<field name="country_id" ref="base.fr" />
<field name="vat">FR14987654324</field>
</record>

<record id="test_line_import_config" model="account.invoice.import.config">
<field name="name">Test line</field>
<field name="partner_id" ref="test_line" />
<field name="invoice_line_method">nline_no_product</field>
<field name="account_id" ref="charge_account" />
<field
name="tax_ids"
eval="[(4, ref('account_invoice_import_facturx.fr_vat_purchase_20'))]"
/>
</record>


</odoo>
Loading