Skip to content

Commit

Permalink
l10n_fr_intrastat_product: Improve migration script
Browse files Browse the repository at this point in the history
Update data for account.fiscal.position.template
  • Loading branch information
alexis-via committed Sep 9, 2024
1 parent ca3ae67 commit 1c85879
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 23 deletions.
12 changes: 6 additions & 6 deletions l10n_fr_intrastat_product/README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
===
DEB
===
=====
EMEBI
=====

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Expand Down Expand Up @@ -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 <http://www.douane.gouv.fr/articles/a10897-notions-essentielles-sur-la-declaration-d-echanges-de-biens>`_.
More information about the EMEBI is available on this `official web page <https://www.douane.gouv.fr/fiche/reglementation-sur-la-reponse-lenquete-mensuelle-statistique-sur-les-echanges-de-biens-intra>`_.

**Table of contents**

Expand All @@ -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 <https://pro.douane.gouv.fr/>`_ 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 <https://www.douane.gouv.fr/>`_ and upload the EMEBI XML file.

Bug Tracker
===========
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,10 @@
>
<field name="intrastat" eval="True" />
</record>
<record
id="l10n_fr.fiscal_position_template_intraeub2c"
model="account.fiscal.position.template"
>
<field name="intrastat" eval="True" />
</record>
</odoo>
20 changes: 13 additions & 7 deletions l10n_fr_intrastat_product/migrations/14.0.1.0.0/pre-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# 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",
)
13 changes: 6 additions & 7 deletions l10n_fr_intrastat_product/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>DEB</title>
<title>EMEBI</title>
<style type="text/css">

/*
Expand Down Expand Up @@ -360,8 +359,8 @@
</style>
</head>
<body>
<div class="document" id="deb">
<h1 class="title">DEB</h1>
<div class="document" id="emebi">
<h1 class="title">EMEBI</h1>

<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
Expand All @@ -370,8 +369,8 @@ <h1 class="title">DEB</h1>
!! source digest: sha256:87e23eb5a0bd06a8b4153e3e88f0f705e2130c27d9c37a536b1040c2e67ea893
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-france/tree/14.0/l10n_fr_intrastat_product"><img alt="OCA/l10n-france" src="https://img.shields.io/badge/github-OCA%2Fl10n--france-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-france-14-0/l10n-france-14-0-l10n_fr_intrastat_product"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-france&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module adds support for the <em>Déclaration d’Échange de Biens</em> (DEB) for France.</p>
<p>More information about the DEB is available on this <a class="reference external" href="http://www.douane.gouv.fr/articles/a10897-notions-essentielles-sur-la-declaration-d-echanges-de-biens">official web page</a>.</p>
<p>This module adds support for the <em>Enquête mensuelle statistique sur les échanges de biens intra-UE</em> (EMEBI), for France. Before 2022, this declaration was called Déclaration d’Échange de Biens (DEB).</p>
<p>More information about the EMEBI is available on this <a class="reference external" href="https://www.douane.gouv.fr/fiche/reglementation-sur-la-reponse-lenquete-mensuelle-statistique-sur-les-echanges-de-biens-intra">official web page</a>.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
Expand Down Expand Up @@ -400,7 +399,7 @@ <h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
<p>To use this module, you need to go to the menu Invoicing &gt; Reports &gt; Intrastat &gt; 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 <em>Generate lines from invoices</em> to automatically generate the lines of DEB. After checking the lines that have been automatically generated, click on the button <em>Attach XML file</em> to create the XML file corresponding to the DEB. Eventually, connect to your account on <a class="reference external" href="https://pro.douane.gouv.fr/">pro.douane</a> and upload the DEB XML file.</p>
<p>To use this module, you need to go to the menu Invoicing &gt; Reports &gt; Intrastat &gt; 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 <em>Generate lines from invoices</em> to automatically generate the computation lines of EMEBI. After checking the lines that have been automatically generated, click on the button <em>Confirm</em> to generate the declaration lines, create the XML file and set the declaration readonly. Eventually, connect to your account on <a class="reference external" href="https://www.douane.gouv.fr/">douane.gouv.fr</a> and upload the EMEBI XML file.</p>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
Expand Down
2 changes: 1 addition & 1 deletion l10n_fr_intrastat_service/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.douane.gouv.fr/articles/a10899-la-declaration-europeenne-de-services-des>`_.
More information about the DES is available on this `official web page <https://www.douane.gouv.fr/service-en-ligne/declaration-europeenne-de-services-des>`_.

**Table of contents**

Expand Down
3 changes: 1 addition & 2 deletions l10n_fr_intrastat_service/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand Down Expand Up @@ -372,7 +371,7 @@ <h1 class="title">DES</h1>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-france/tree/14.0/l10n_fr_intrastat_service"><img alt="OCA/l10n-france" src="https://img.shields.io/badge/github-OCA%2Fl10n--france-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-france-14-0/l10n-france-14-0-l10n_fr_intrastat_service"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-france&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module adds support for the <strong>Déclaration Européenne des Services</strong> (DES) for France.</p>
<p>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.</p>
<p>More information about the DES is available on this <a class="reference external" href="http://www.douane.gouv.fr/articles/a10899-la-declaration-europeenne-de-services-des">official web page</a>.</p>
<p>More information about the DES is available on this <a class="reference external" href="https://www.douane.gouv.fr/service-en-ligne/declaration-europeenne-de-services-des">official web page</a>.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
Expand Down

0 comments on commit 1c85879

Please sign in to comment.