Skip to content

Commit

Permalink
Merge PR #413 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by alexis-via
  • Loading branch information
OCA-git-bot committed Jun 9, 2023
2 parents 7ee76c7 + f7dc05d commit 35edd8e
Show file tree
Hide file tree
Showing 55 changed files with 28,650 additions and 0 deletions.
100 changes: 100 additions & 0 deletions l10n_fr_intrastat_product/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
===
DEB
===

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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%2Fl10n--france-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-france/tree/14.0/l10n_fr_intrastat_product
:alt: OCA/l10n-france
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/l10n-france-14-0/l10n-france-14-0-l10n_fr_intrastat_product
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/121/14.0
:alt: Try me on Runbot

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

This module adds support for the *Déclaration d'Échange de Biens* (DEB) for France.

More information about the DEB is available on this `official web page <http://www.douane.gouv.fr/articles/a10897-notions-essentielles-sur-la-declaration-d-echanges-de-biens>`_.

**Table of contents**

.. contents::
:local:

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

To configure this module, you need to:

* go to the menu Invoicing > Configuration > Intrastat > Transaction Types to create/verify the Transaction Types
* go to the menu Invoicing > Settings and go to the *Intrastat* section

Make sure that you have already configured the other modules *intrastat_base* and *intrastat_product* on which this module depends.

WARNING: there are A LOT of settings for DEB and all these settings need to be configured properly to generate DEBs with Odoo.

Usage
=====

To use this module, you need to go to the menu Invoicing > Reports > Intrastat > DEB and create a new DEB. Depending on your obligation levels, you may have to create 2 DEBs: one for export (Expéditions) and one for import (Introductions). Then, click on the button *Generate lines from invoices* to automatically generate the lines of DEB. After checking the lines that have been automatically generated, click on the button *Attach XML file* to create the XML file corresponding to the DEB. Eventually, connect to your account on `pro.douane <https://pro.douane.gouv.fr/>`_ and upload the DEB XML file.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-france/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/l10n-france/issues/new?body=module:%20l10n_fr_intrastat_product%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]>

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/l10n-france <https://github.com/OCA/l10n-france/tree/14.0/l10n_fr_intrastat_product>`_ 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 l10n_fr_intrastat_product/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import models
from . import wizards
from .post_install import set_fr_company_intrastat
34 changes: 34 additions & 0 deletions l10n_fr_intrastat_product/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright 2010-2022 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": "EMEBI",
"version": "16.0.1.0.0",
"category": "Localisation/Report Intrastat",
"license": "AGPL-3",
"summary": "EMEBI (ex-DEB) for France",
"author": "Akretion,Odoo Community Association (OCA)",
"maintainers": ["alexis-via"],
"website": "https://github.com/OCA/l10n-france",
"depends": [
"l10n_fr",
"intrastat_product",
"l10n_fr_department",
],
"data": [
"security/ir.model.access.csv",
"data/account_fiscal_position_template.xml",
"data/intrastat_fr_regime.xml",
"views/intrastat_product_declaration.xml",
"views/intrastat_fr_regime.xml",
"views/intrastat_unit.xml",
"data/intrastat_product_reminder.xml",
"views/res_config_settings.xml",
"views/product_template.xml",
],
"post_init_hook": "set_fr_company_intrastat",
"demo": ["demo/intrastat_demo.xml"],
"installable": True,
"application": True,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2020-2023 Akretion France
@author: Alexis de Lattre <[email protected]>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<record
id="l10n_fr.fiscal_position_template_intraeub2b"
model="account.fiscal.position.template"
>
<field name="intrastat">b2b</field>
</record>
<record
id="l10n_fr.fiscal_position_template_intraeub2c"
model="account.fiscal.position.template"
>
<field name="intrastat">b2c</field>
</record>
</odoo>
139 changes: 139 additions & 0 deletions l10n_fr_intrastat_product/data/deb.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="INSTAT">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="Envelope"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Envelope">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="envelopeId"/>
<xsd:element ref="DateTime"/>
<xsd:element ref="Party"/>
<xsd:element ref="softwareUsed" minOccurs="0"/>
<xsd:element ref="Declaration" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="envelopeId" type="xsd:string"/>
<xsd:element name="DateTime">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="date"/>
<xsd:element ref="time" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Party">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="partyId"/>
<xsd:element ref="partyName"/>
</xsd:sequence>
<xsd:attribute name="partyType" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:NMTOKEN">
<xsd:enumeration value="PSI"/>
<xsd:enumeration value="TDP"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="partyRole" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:NMTOKEN">
<xsd:enumeration value="sender"/>
<xsd:enumeration value="PSI"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="partyId" type="xsd:string"/>
<xsd:element name="partyName" type="xsd:string"/>
<xsd:element name="softwareUsed" type="xsd:string"/>
<xsd:element name="Declaration">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="declarationId"/>
<xsd:element ref="referencePeriod"/>
<xsd:element ref="PSIId"/>
<xsd:element ref="Function"/>
<xsd:element ref="declarationTypeCode"/>
<xsd:element ref="flowCode"/>
<xsd:element ref="currencyCode"/>
<xsd:element ref="Item" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="declarationId" type="xsd:string"/>
<xsd:element name="referencePeriod" type="xsd:string"/>
<xsd:element name="PSIId" type="xsd:string"/>
<xsd:element name="Function">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="functionCode"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="functionCode" type="xsd:string"/>
<xsd:element name="declarationTypeCode" type="xsd:string"/>
<xsd:element name="flowCode" type="xsd:string"/>
<xsd:element name="currencyCode" type="xsd:string"/>
<xsd:element name="Item">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="itemNumber"/>
<xsd:element ref="CN8" minOccurs="0"/>
<xsd:element ref="MSConsDestCode" minOccurs="0"/>
<xsd:element ref="countryOfOriginCode" minOccurs="0"/>
<xsd:element ref="netMass" minOccurs="0"/>
<xsd:element ref="quantityInSU" minOccurs="0"/>
<xsd:element ref="invoicedAmount"/>
<xsd:element ref="partnerId" minOccurs="0"/>
<xsd:element ref="invoicedNumber" minOccurs="0"/>
<xsd:element ref="statisticalProcedureCode" />
<xsd:element ref="NatureOfTransaction" minOccurs="0"/>
<xsd:element ref="modeOfTransportCode" minOccurs="0"/>
<xsd:element ref="regionCode" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="itemNumber" type="xsd:integer"/>
<xsd:element name="CN8">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="CN8Code" minOccurs="0"/>
<xsd:element ref="SUCode" minOccurs="0"/>
<xsd:element ref="additionalGoodsCode" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="CN8Code" type="xsd:string"/>
<xsd:element name="SUCode" type="xsd:string"/>
<xsd:element name="additionalGoodsCode" type="xsd:string"/>
<xsd:element name="MSConsDestCode" type="xsd:string"/>
<xsd:element name="countryOfOriginCode" type="xsd:string"/>
<xsd:element name="netMass" type="xsd:integer"/>
<xsd:element name="quantityInSU" type="xsd:integer"/>
<xsd:element name="invoicedAmount" type="xsd:integer"/>
<xsd:element name="partnerId" type="xsd:string"/>
<xsd:element name="invoicedNumber" type="xsd:string"/>
<xsd:element name="statisticalProcedureCode" type="xsd:integer"/>
<xsd:element name="NatureOfTransaction">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="natureOfTransactionACode"/>
<xsd:element ref="natureOfTransactionBCode" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="natureOfTransactionACode" type="xsd:string"/>
<xsd:element name="natureOfTransactionBCode" type="xsd:string"/>
<xsd:element name="modeOfTransportCode" type="xsd:string"/>
<xsd:element name="regionCode" type="xsd:string"/>
<xsd:element name="date" type="xsd:date"/>
<xsd:element name="time" type="xsd:time"/>
</xsd:schema>
95 changes: 95 additions & 0 deletions l10n_fr_intrastat_product/data/intrastat_fr_regime.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2023 Akretion France (http://www.akretion.com/)
@author: Alexis de Lattre <[email protected]>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo noupdate="0">
<record id="fr_regime_11" model="intrastat.fr.regime">
<field name="code">11</field>
<field name="name">Acquisitions taxables en France</field>
<field name="is_fiscal_only" eval="False" />
<field name="fiscal_value_multiplier">1</field>
<field name="declaration_type">arrivals</field>
</record>
<record id="fr_regime_19" model="intrastat.fr.regime">
<field name="code">19</field>
<field name="name">Autres introductions</field>
<field
name="description"
>Ensemble des introductions qui ne constituent pas des acquisitions intracommunautaires de biens au sens de l'article 256 bis du code général des impôts :
- introductions de biens en vue d'une prestation de services (travail à façon…) ;
- réintroductions de biens en suite d'une prestation de services (travail à façon…) ;
- placements sous un régime suspensif, y compris le placement de marchandises en provenance d'un État membre sous l'un des cinq types d'entrepôts fiscaux prévus par les textes nationaux ;
- introductions de biens destinés à un montage ou une installation ;
- introductions de biens d'occasion, d'oeuvres d'art, d'objets de collection et d'antiquité ;
- introduction de biens par des assujettis non établis en France pour y réaliser des exportations ;
- achats effectués par un assujetti français en franchise de TVA ;
- achats de biens exonérés de TVA (organes, sang et lait humains…) en vertu de l'article 291 du code général des impôts ;
- dons, cadeaux.</field>
<field name="is_fiscal_only" eval="False" />
<field name="fiscal_value_multiplier">0</field>
<field name="declaration_type">arrivals</field>
</record>

<record id="fr_regime_21" model="intrastat.fr.regime">
<field name="code">21</field>
<field
name="name"
>Livraison exonérée en France et taxable dans l'Etat membre d'arrivée</field>
<field name="is_fiscal_only" eval="False" />
<field name="fiscal_value_multiplier">1</field>
<field name="declaration_type">dispatches</field>
</record>
<record id="fr_regime_29" model="intrastat.fr.regime">
<field name="code">29</field>
<field name="name">Autres expéditions (vente à distance B2C…)</field>
<field
name="description"
>- Éxpéditions de biens en vue d'une prestation de services (travail à façon…) ;
- Réexpéditions de biens en suite d'une prestation de services (travail à façon…) ;
- Éxpéditions de biens destinés à faire l'objet d'un montage ou d'une installation ;
- Éxpéditions de biens dans le cadre de ventes à distance B2C ;
- Éxpéditions de biens d'occasion, d'oeuvres d'art, d'objets de collection et d'antiquité ;
- Livraisons aux forces armées étrangères, aux organismes internationaux et aux ambassades
étrangères établis dans un autre État membre ;
- Livraisons de moyens de transport neufs à des particuliers ;
- Éxpéditions en vue de l'accomplissement des formalités d'exportation dans un autre État
membre ;
- Dons, cadeaux.</field>
<field name="is_fiscal_only" eval="False" />
<field name="fiscal_value_multiplier">0</field>
<field name="declaration_type">dispatches</field>
</record>
<record id="fr_regime_25" model="intrastat.fr.regime">
<field name="code">25</field>
<field
name="name"
>Régularisation commerciale entraînant une minoration de valeur</field>
<field name="description">Rabais, remise, ristourne</field>
<field name="is_fiscal_only" eval="True" />
<field name="fiscal_value_multiplier">-1</field>
<field name="declaration_type">dispatches</field>
</record>
<record id="fr_regime_26" model="intrastat.fr.regime">
<field name="code">26</field>
<field
name="name"
>Régularisation commerciale entraînant une majoration de valeur</field>
<field name="is_fiscal_only" eval="True" />
<field name="fiscal_value_multiplier">1</field>
<field name="declaration_type">dispatches</field>
</record>
<record id="fr_regime_31" model="intrastat.fr.regime">
<field name="code">31</field>
<field name="name">Opérations particulières</field>
<field
name="description"
>Refacturation dans le cadre d'une opération triangulaire, ou facturation de matériaux à un donneur d'ouvrage établi dans un autre État membre, les
matériaux faisant l'objet d'une prestation de services en France</field>
<field name="is_fiscal_only" eval="True" />
<field name="fiscal_value_multiplier">1</field>
<field name="declaration_type">dispatches</field>
</record>

</odoo>
Loading

0 comments on commit 35edd8e

Please sign in to comment.