From 1c858795ff255fd28301a33ea0e373a6c6ecca86 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 9 Sep 2024 19:20:38 +0200 Subject: [PATCH] l10n_fr_intrastat_product: Improve migration script Update data for account.fiscal.position.template --- l10n_fr_intrastat_product/README.rst | 12 +++++------ .../data/account_fiscal_position_template.xml | 6 ++++++ .../migrations/14.0.1.0.0/pre-migration.py | 20 ++++++++++++------- .../static/description/index.html | 13 ++++++------ l10n_fr_intrastat_service/README.rst | 2 +- .../static/description/index.html | 3 +-- 6 files changed, 33 insertions(+), 23 deletions(-) diff --git a/l10n_fr_intrastat_product/README.rst b/l10n_fr_intrastat_product/README.rst index a59d01b1f..216585be1 100644 --- a/l10n_fr_intrastat_product/README.rst +++ b/l10n_fr_intrastat_product/README.rst @@ -1,6 +1,6 @@ -=== -DEB -=== +===== +EMEBI +===== .. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -28,9 +28,9 @@ DEB |badge1| |badge2| |badge3| |badge4| |badge5| -This module adds support for the *Déclaration d'Échange de Biens* (DEB) for France. +This module adds support for the *Enquête mensuelle statistique sur les échanges de biens intra-UE* (EMEBI), for France. Before 2022, this declaration was called Déclaration d'Échange de Biens (DEB). -More information about the DEB is available on this `official web page `_. +More information about the EMEBI is available on this `official web page `_. **Table of contents** @@ -52,7 +52,7 @@ WARNING: there are A LOT of settings for DEB and all these settings need to be c 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 `_ and upload the DEB XML file. +To use this module, you need to go to the menu Invoicing > Reports > Intrastat > EMEBI and create a new EMEBI. Depending on your obligation levels, you may have to create 2 EMEBIs: one for departures (Expéditions) and one for arrivals (Introductions). Then, click on the button *Generate lines from invoices* to automatically generate the computation lines of EMEBI. After checking the lines that have been automatically generated, click on the button *Confirm* to generate the declaration lines, create the XML file and set the declaration readonly. Eventually, connect to your account on `douane.gouv.fr `_ and upload the EMEBI XML file. Bug Tracker =========== diff --git a/l10n_fr_intrastat_product/data/account_fiscal_position_template.xml b/l10n_fr_intrastat_product/data/account_fiscal_position_template.xml index b93d3b39a..fd58222f7 100644 --- a/l10n_fr_intrastat_product/data/account_fiscal_position_template.xml +++ b/l10n_fr_intrastat_product/data/account_fiscal_position_template.xml @@ -11,4 +11,10 @@ > + + + diff --git a/l10n_fr_intrastat_product/migrations/14.0.1.0.0/pre-migration.py b/l10n_fr_intrastat_product/migrations/14.0.1.0.0/pre-migration.py index cc47d4ffe..ddabafc3d 100644 --- a/l10n_fr_intrastat_product/migrations/14.0.1.0.0/pre-migration.py +++ b/l10n_fr_intrastat_product/migrations/14.0.1.0.0/pre-migration.py @@ -2,12 +2,18 @@ # @author: Alexis de Lattre # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from openupgradelib import openupgrade -def migrate(cr, version): - if not version: - return - cr.execute( - 'ALTER TABLE "l10n_fr_intrastat_product_declaration" RENAME "type" ' - 'TO "declaration_type"' - ) +@openupgrade.migrate() +def migrate(env, version): + if openupgrade.table_exists( + env.cr, "l10n_fr_intrastat_product_declaration" + ) and openupgrade.column_exists( + env.cr, "l10n_fr_intrastat_product_declaration", "type" + ): + openupgrade.logged_query( + env.cr, + "ALTER TABLE l10n_fr_intrastat_product_declaration RENAME type " + "TO declaration_type", + ) diff --git a/l10n_fr_intrastat_product/static/description/index.html b/l10n_fr_intrastat_product/static/description/index.html index e009bb593..b9816536e 100644 --- a/l10n_fr_intrastat_product/static/description/index.html +++ b/l10n_fr_intrastat_product/static/description/index.html @@ -1,10 +1,9 @@ - -DEB +EMEBI -
-

DEB

+
+

EMEBI

Beta License: AGPL-3 OCA/l10n-france Translate me on Weblate Try me on Runboat

-

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.

+

This module adds support for the Enquête mensuelle statistique sur les échanges de biens intra-UE (EMEBI), for France. Before 2022, this declaration was called Déclaration d’Échange de Biens (DEB).

+

More information about the EMEBI is available on this official web page.

Table of contents

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 and upload the DEB XML file.

+

To use this module, you need to go to the menu Invoicing > Reports > Intrastat > EMEBI and create a new EMEBI. Depending on your obligation levels, you may have to create 2 EMEBIs: one for departures (Expéditions) and one for arrivals (Introductions). Then, click on the button Generate lines from invoices to automatically generate the computation lines of EMEBI. After checking the lines that have been automatically generated, click on the button Confirm to generate the declaration lines, create the XML file and set the declaration readonly. Eventually, connect to your account on douane.gouv.fr and upload the EMEBI XML file.

Bug Tracker

diff --git a/l10n_fr_intrastat_service/README.rst b/l10n_fr_intrastat_service/README.rst index ac0bd6df4..d1615d052 100644 --- a/l10n_fr_intrastat_service/README.rst +++ b/l10n_fr_intrastat_service/README.rst @@ -32,7 +32,7 @@ This module adds support for the **Déclaration Européenne des Services** (DES) The DES declaration has been introduced on January 1st 2010 in France. All French companies must send this declaration each month to France's Customs administration if they sell services without VAT to other EU companies. -More information about the DES is available on this `official web page `_. +More information about the DES is available on this `official web page `_. **Table of contents** diff --git a/l10n_fr_intrastat_service/static/description/index.html b/l10n_fr_intrastat_service/static/description/index.html index ff78b9a21..b620a9fb8 100644 --- a/l10n_fr_intrastat_service/static/description/index.html +++ b/l10n_fr_intrastat_service/static/description/index.html @@ -1,4 +1,3 @@ - @@ -372,7 +371,7 @@

DES

Beta License: AGPL-3 OCA/l10n-france Translate me on Weblate Try me on Runboat

This module adds support for the Déclaration Européenne des Services (DES) for France.

The DES declaration has been introduced on January 1st 2010 in France. All French companies must send this declaration each month to France’s Customs administration if they sell services without VAT to other EU companies.

-

More information about the DES is available on this official web page.

+

More information about the DES is available on this official web page.

Table of contents