Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
94dbc53
Initial commit of the entirely new code for report_intrastat for France.
Mar 27, 2011
c2db5e8
Better performances : we now use multi= to compute numbers of lines a…
Mar 27, 2011
b5b0dc4
Add currency in view via a fields.related on report_intrastat_service…
Mar 27, 2011
cbf9b56
View style update
Mar 27, 2011
549ad42
Started work on l10n_fr_intrastat_product
Mar 31, 2011
0301611
First alpha version of the new module "l10n_fr_intrastat_product". Fi…
Apr 1, 2011
648b70f
More work on full DEB+DES implementation. Added full support for "tra…
Apr 3, 2011
ff45045
Converted some fields on report_intrastat_product/service to many2one…
Apr 4, 2011
a47ebeb
Complete change of design for intrastat_type ! Now that report_intras…
Apr 4, 2011
21223c0
Renamed some fields Now manages the specifications of the different p…
Apr 5, 2011
756a6f7
"Date done" converted to date + time. Re-order fields in intrastat_se…
Apr 6, 2011
7bcbc7c
Removed from prints (not all yet)
Apr 7, 2011
006fcb6
Removed unused code in SQL query (this "id" field was required when i…
Apr 9, 2011
12345b6
Full re-design of intrastat types : probably requires deleting the re…
Apr 18, 2011
c6d5e2e
Moved some demo data from l10n_fr_intrastat_product to intrastat_base…
Apr 26, 2011
b988888
Moved the field exclude_from_intrastat_if_present of account.tax from…
May 9, 2011
81abe17
Update of some strings before translation. Started translation work.
Jun 10, 2011
2f0d44d
Translation and strings update. Add demo data.
Aug 16, 2011
67a1e72
Port to OpenERP v6 Add seach views for Intrastat product and Intrasta…
Aug 16, 2011
2b79539
l10n_fr_intrastat_service : Moved the raise if the Partner VAT number…
Sep 5, 2011
5db7b3d
Update translations.
Sep 9, 2011
2ed8c73
Updated licence pointer.
Jan 30, 2012
a637944
Add option "is_accessory_cost" on product.template : If the invoice h…
Jun 5, 2012
2dc57dc
Update FR translation.
Jun 5, 2012
c88851d
Code clean-up : - context is not passed in constraints - don't use la…
Nov 27, 2012
dfaaa70
IMPORTANT CHANGE : - All EU countries should now be intrastat=True, i…
Apr 23, 2013
2314a13
Initial port to v7.0. Not tested a lot for the moment.
Apr 24, 2013
bb442e6
Introduce a big hack to make the fields added on stock.picking work R…
May 1, 2013
2cd886b
Adapt views to new v7.0 style. Replace "note" field by the mail.threa…
May 7, 2013
debe01d
Handle the case where we have in an invoice : - some HW products with…
May 14, 2013
5c264e2
Use the GREAT feature widget="monetary"
May 17, 2013
a3b8da5
Should now be compatible with both OCB and RS-OCB Add field import_ob…
Jun 3, 2013
0f28390
Add an e-mail reminder for l10n_fr_intrastat_product and l10n_fr_intr…
Aug 26, 2013
6446042
Fix to make the module truly usable when user is not part of the grou…
Oct 23, 2013
979103d
Add ir.rule for multi-company. Better "OpenERP v7 style/ergonomy" for…
Feb 1, 2014
a2c552b
Only send reminder for French companies.
Mar 8, 2014
43989c2
Use l10n_fr_* : use the method _company_default_get() intrastat_base …
Apr 14, 2014
f98ba13
Add context in on_change (to be able to use web_context_tunnel) XSD f…
Apr 14, 2014
95722f2
l10n_fr_intrastat_service : update POT file and FR translation. l10n_…
Apr 14, 2014
fb608d7
Continue the work on port to v8.0
Jul 3, 2014
69a4bee
Add intrastat_type_data and update demo data accordingly Remove versi…
Jul 3, 2014
89a0c53
When the obligation level for import is none, the type of the DEB is …
Oct 30, 2014
ee0995a
Add module intrastat_product. Rename report.intrastat.product to l10n…
Nov 28, 2014
9798c66
Forgot rename of model in service reminder file
Dec 26, 2014
cdec4b3
intrastat_base + l10n_fr_intrastat_service : port to new API
Dec 26, 2014
6dd81b3
Continue the port to the new API Access for intrastat report to accou…
Feb 7, 2015
3b334fc
Continue port to new API + PEP8. First working version.
Feb 9, 2015
790fc96
Update translation and adapt a few strings
May 11, 2015
204be84
PEP8 compliant Port a line of code that was commented with a TODO
May 11, 2015
18698b6
l10n_fr_intrastat_service: update string and translation
May 11, 2015
72c4f52
Update FR intrastat module for intrastat v3 !
alexis-via Nov 13, 2015
289d8fa
Update views following changes in intrastat_product
alexis-via Nov 17, 2015
3847917
Add migration script for DES
alexis-via Dec 15, 2015
676a1e7
The field exclude_from_intrastat has been removed
alexis-via Apr 1, 2016
7e19dad
Add test suite for DES
alexis-via Apr 14, 2016
0a68507
More demo data, more in-depth testing
alexis-via Apr 15, 2016
a3ddce7
Cosmetic update
alexis-via Apr 15, 2016
91f33d1
Add message in chatter when generating lines from invoices
alexis-via Apr 16, 2016
3526af8
Fix DES mail template (field num_decl_lines)
alexis-via Jan 17, 2017
35b09de
Port l10n_fr_intrastat_service to v10
alexis-via Jan 18, 2017
5bffd22
Update README for DEB and DES
alexis-via Mar 8, 2017
bf3438b
Suggestions of David Beal: remove @api.multi (default in v10) and use…
alexis-via Mar 8, 2017
08bf14c
Put DEB menu before DES menu
alexis-via Mar 8, 2017
a7cecf7
Update README for DES
alexis-via Apr 25, 2017
9eab107
OCA Transbot updated translations from Transifex
oca-transbot May 1, 2017
0e405c2
Fix new flake8 errors (E722 do not use bare except)
Oct 24, 2017
f4ab7bb
DES: improve error messages
alexis-via Mar 7, 2018
e66d14e
remove obsolete .pot files [ci skip]
sbidoul Jun 15, 2018
64eb667
Update l10n_fr_intrastat_service.pot
oca-travis Jun 22, 2018
93357d3
IMP add buttons to jump into prodouane site
bealdav Nov 7, 2018
c3674d7
Update l10n_fr_intrastat_service.pot
oca-travis Nov 7, 2018
c4735fd
Update translation files
oca-transbot Dec 9, 2018
5e5d5d3
icon.png
OCA-git-bot Apr 3, 2019
f8398c0
[MIG] l10n_fr_intrastat_service from v10 to v12
alexis-via Apr 12, 2019
913a186
PEP8 fix
alexis-via Apr 12, 2019
08da0e2
[FIX] Intrastat Service: positional argument in message_post
ThomasBinsfeld May 10, 2019
5752918
[IMP] Intrastat Service: use commercial partner
ThomasBinsfeld May 13, 2019
30c5dce
[UPD] README.rst
OCA-git-bot May 15, 2019
0d58f09
[UPD] README.rst
OCA-git-bot Jul 29, 2019
a8afb5e
[UPD] Update l10n_fr_intrastat_service.pot
oca-travis Jul 29, 2019
abde4e5
Update translation files
oca-transbot Jul 29, 2019
ac129f2
[MIG] l10n_fr_intrastat_service to v13
alexis-via Jun 7, 2020
7d9628d
DES: black, isort, ...
alexis-via Jun 7, 2020
40eb421
[UPD] README.rst
OCA-git-bot Jun 8, 2020
02e661a
DES: up-port xlsx report from v10
alexis-via Jun 8, 2020
29cc73e
DES: Improve code for the loop on invoice lines
alexis-via Jun 9, 2020
1785221
Update translation files
oca-transbot Aug 16, 2020
a8a6399
[MIG] l10n_fr_intrastat_service from v13 to v14
alexis-via Oct 14, 2020
021b627
DES: use the new field intrastat_fiscal_position
alexis-via Jan 5, 2021
6f802cb
DES: mig XLSX export
alexis-via Jan 5, 2021
f9b2490
DES: add support for Brexit
alexis-via Jan 22, 2021
c091c31
[UPD] README.rst
OCA-git-bot Feb 1, 2021
50571ce
l10n_fr_intrastat_service: improve DES tree view
alexis-via Jun 7, 2021
8ef5889
[REF] Fix pre-commit ignoring modules
legalsylvain Aug 10, 2021
891cf22
[UPD] README.rst
OCA-git-bot Aug 10, 2021
0a66622
l10n_fr_intrastat_service 14.0.1.0.1
OCA-git-bot Aug 10, 2021
6da01b7
Restore tests and remove Alpha status
alexis-via Sep 1, 2021
1147223
[UPD] Update l10n_fr_intrastat_service.pot
oca-travis Sep 2, 2021
01758e6
[UPD] README.rst
OCA-git-bot Sep 2, 2021
b004b10
l10n_fr_intrastat_service 14.0.1.0.2
OCA-git-bot Sep 2, 2021
7e2cac9
Update translation files
oca-transbot Sep 2, 2021
122c0e8
intrastat: adapt to changes in OCA/intrastat-extrastat
alexis-via Dec 15, 2021
9f66870
[UPD] Update l10n_fr_intrastat_service.pot
oca-travis Jan 11, 2022
9fe6342
Update translation files
oca-transbot Jan 11, 2022
910fee6
[FIX] l10n_fr_intrastat_service: fix reminder email
alexis-via Jan 28, 2022
a02dfcd
l10n_fr_intrastat_service 14.0.1.1.0
OCA-git-bot Apr 15, 2022
d86e990
Translated using Weblate (Italian)
francesco-ooops May 18, 2022
b46dda0
l10n_fr_intrastat_* : update, improve and simplify
alexis-via Nov 4, 2022
1ed4d11
l10n_fr_intrastat_service: fix mail.template for reminder
alexis-via Jan 12, 2023
64b5659
emebi: adapt to new warn msg code
alexis-via Jan 24, 2023
7fe02ed
DES: fix and improve tests
alexis-via Jan 30, 2023
c129633
[MIG] l10n_fr_intrastat_service to v16
alexis-via Jan 30, 2023
cf9f6e1
des: adapt to changes in intrastat_base
alexis-via Feb 8, 2023
8525bef
[UPD] Update l10n_fr_intrastat_service.pot
Mar 6, 2023
5330757
[UPD] README.rst
OCA-git-bot Mar 6, 2023
c2ffb24
Update translation files
weblate Mar 6, 2023
018681e
Translated using Weblate (Italian)
mymage Mar 23, 2023
44088fa
[UPD] Update l10n_fr_intrastat_service.pot
Jun 8, 2023
b6b5d3f
Update translation files
weblate Jun 8, 2023
bff4aec
DES: fix mail template syntax
alexis-via Jun 8, 2023
a048453
Translated using Weblate (French)
Jun 8, 2023
8a6d2cd
[UPD] Update l10n_fr_intrastat_service.pot
Jun 8, 2023
af4748e
l10n_fr_intrastat_service 16.0.1.1.0
OCA-git-bot Jun 8, 2023
245e74d
Update translation files
weblate Jun 8, 2023
3f52986
[FIX] EMEBI/DES: update mail templates
alexis-via Jun 20, 2023
22e9ade
l10n_fr_intrastat_service 16.0.1.2.0
OCA-git-bot Jun 20, 2023
3583812
intrastat: set lang in mail template
alexis-via Jun 20, 2023
348b991
[UPD] Update l10n_fr_intrastat_service.pot
Sep 2, 2023
5d93560
[UPD] README.rst
OCA-git-bot Sep 3, 2023
c80eb85
Translated using Weblate (Spanish)
Ivorra78 Aug 21, 2023
6cab83f
Update translation files
weblate Sep 3, 2023
f211c2f
Translated using Weblate (Spanish)
Ivorra78 Sep 4, 2023
15224bc
Translated using Weblate (Spanish)
Ivorra78 Sep 15, 2023
c81bf3b
Update translation files
weblate Oct 9, 2023
77aa7de
[UPD] Update l10n_fr_intrastat_service.pot
Oct 27, 2023
7e1cfe5
Update translation files
weblate Oct 31, 2023
e131fa8
[BOT] post-merge updates
OCA-git-bot Oct 31, 2023
e2c626b
DES: use lxml objectify to improve readability of XML generation
alexis-via Nov 22, 2023
1559660
[BOT] post-merge updates
OCA-git-bot Nov 28, 2023
acfdee1
l10n_fr_intrastat_service: code cleanup
alexis-via Jan 19, 2024
d9627cf
l10n_fr_intrastat_service: pre-commit auto fixes
alexis-via Jan 19, 2024
ea434aa
[MIG] l10n_fr_intrastat_service to v17
alexis-via Jan 19, 2024
e637201
[UPD] Update l10n_fr_intrastat_service.pot
Feb 12, 2024
0e9cd6c
[BOT] post-merge updates
OCA-git-bot Feb 12, 2024
915dbac
Update translation files
weblate Feb 12, 2024
6df7d9a
Update translation files
weblate Feb 12, 2024
944556c
Translated using Weblate (Spanish)
Ivorra78 Feb 16, 2024
c8180fe
[UPD] Update l10n_fr_intrastat_service.pot
Sep 28, 2024
4b1c53d
Update translation files
weblate Sep 28, 2024
7a8e3d9
[IMP] l10n_fr_intrastat_service: pre-commit fixes
alexis-via Jan 3, 2025
df9a1a4
[MIG] l10n_fr_intrastat_service: migrate to v18
alexis-via Jan 4, 2025
a315725
[UPD] Update l10n_fr_intrastat_service.pot
Feb 11, 2025
61c9872
[BOT] post-merge updates
OCA-git-bot Feb 11, 2025
ae215b5
Update translation files
weblate Feb 11, 2025
6bce65a
[IMP] l10n_fr_intrastat_service: improve and speedup tests
alexis-via Feb 17, 2025
a4dc3f2
[BOT] post-merge updates
OCA-git-bot Feb 18, 2025
fff635c
[UPD] Update l10n_fr_intrastat_service.pot
Jun 20, 2025
d49412a
Update translation files
weblate Jun 20, 2025
301317f
[IMP] l10n_fr_intrastat_service: one less click!
alexis-via Sep 2, 2025
6e558c3
[BOT] post-merge updates
OCA-git-bot Sep 8, 2025
e964bec
[MIG] l10n_fr_intrastat_service: 18 -> 19
alexis-via Dec 22, 2025
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
108 changes: 108 additions & 0 deletions l10n_fr_intrastat_service/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

===
DES
===

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

.. |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/license-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/19.0/l10n_fr_intrastat_service
: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-19-0/l10n-france-19-0-l10n_fr_intrastat_service
: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/l10n-france&target_branch=19.0
:alt: Try me on Runboat

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

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 <https://www.douane.gouv.fr/service-en-ligne/declaration-europeenne-de-services-des>`__.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, you need to go to the menu Invoicing > Reports >
Intrastat > DES and create a new DES. Then, click on the button
*Generate lines from invoices* to automatically generate the lines of
DES. After checking the lines that have been automatically generated,
click on the button *Attach XML file* to create the XML file
corresponding to the DES. Eventually, connect to your account on
`pro.douane <https://pro.douane.gouv.fr/>`__ and upload the 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 to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/l10n-france/issues/new?body=module:%20l10n_fr_intrastat_service%0Aversion:%2019.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/19.0/l10n_fr_intrastat_service>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions l10n_fr_intrastat_service/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import report
25 changes: 25 additions & 0 deletions l10n_fr_intrastat_service/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2010-2020 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": "DES",
"version": "19.0.1.0.0",
"category": "Localisation/Report Intrastat",
"license": "AGPL-3",
"summary": "Module for Intrastat service reporting (DES) for France",
"author": "Akretion,Odoo Community Association (OCA)",
"maintainers": ["alexis-via"],
"website": "https://github.com/OCA/l10n-france",
"depends": ["intrastat_base", "report_xlsx_helper"],
"external_dependencies": {"python": ["python-stdnum"]},
"data": [
"security/ir.model.access.csv",
"report/report.xml",
"views/intrastat_service.xml",
"data/ir_cron.xml",
"data/mail_template.xml",
"security/intrastat_service_security.xml",
],
"installable": True,
}
133 changes: 133 additions & 0 deletions l10n_fr_intrastat_service/data/des.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="fichier_des">
<xs:annotation>
<xs:documentation>fichier de déclarations de service</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="declaration_des" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="declaration_des">
<xs:annotation>
<xs:documentation>declaration de services </xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="num_des"/>
<xs:element ref="num_tvaFr"/>
<xs:element ref="mois_des"/>
<xs:element ref="an_des"/>
<xs:element ref="ligne_des" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="num_des">
<xs:annotation>
<xs:documentation>numéro de la DES </xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:positiveInteger">
<xs:minInclusive value="1"/>
<xs:maxInclusive value="999999"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="num_tvaFr">
<xs:annotation>
<xs:documentation>numéro TVA </xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[F-f][R-r][0-9A-Za-z]{2}[0-9]{9}"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="mois_des">
<xs:annotation>
<xs:documentation>mois de la DES</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="2"/>
<xs:enumeration value="01"/>
<xs:enumeration value="02"/>
<xs:enumeration value="03"/>
<xs:enumeration value="04"/>
<xs:enumeration value="05"/>
<xs:enumeration value="06"/>
<xs:enumeration value="07"/>
<xs:enumeration value="08"/>
<xs:enumeration value="09"/>
<xs:enumeration value="10"/>
<xs:enumeration value="11"/>
<xs:enumeration value="12"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="an_des">
<xs:annotation>
<xs:documentation>année de la DES</xs:documentation>
<xs:documentation/>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[2][0][1-9][0-9]"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="ligne_des">
<xs:complexType>
<xs:sequence>
<xs:element ref="numlin_des"/>
<xs:element ref="valeur"/>
<xs:element ref="partner_des"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="numlin_des">
<xs:annotation>
<xs:documentation>num de la ligne DES</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:positiveInteger">
<xs:minInclusive value="1"/>
<xs:maxInclusive value="999999"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="valeur">
<xs:annotation>
<xs:documentation>valeur de la ligne de DES</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:union>
<xs:simpleType>
<xs:restriction base="xs:negativeInteger">
<xs:maxInclusive value="-1"/>
<xs:minInclusive value="-9999999999"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
<xs:restriction base="xs:positiveInteger">
<xs:minInclusive value="1"/>
<xs:maxInclusive value="99999999999"/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:element>
<xs:element name="partner_des">
<xs:annotation>
<xs:documentation>partenaire</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="7"/>
<xs:maxLength value="14"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:schema>
19 changes: 19 additions & 0 deletions l10n_fr_intrastat_service/data/ir_cron.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2013-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).
-->
<odoo noupdate="1">
<!-- noupdate = 1 for the 'active' field -->
<record id="intrastat_service_cron" model="ir.cron">
<field name="name">DES Reminder</field>
<field name="active" eval="False" />
<field name="user_id" ref="base.user_root" />
<field name="interval_number">1</field>
<field name="interval_type">months</field>
<field name="model_id" ref="model_l10n_fr_intrastat_service_declaration" />
<field name="state">code</field>
<field name="code">model._scheduler_reminder()</field>
</record>
</odoo>
73 changes: 73 additions & 0 deletions l10n_fr_intrastat_service/data/mail_template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2013-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).
-->
<odoo>
<record id="intrastat_service_reminder_email_template" model="mail.template">
<field name="name">DES Reminder</field>
<field
name="model_id"
ref="l10n_fr_intrastat_service.model_l10n_fr_intrastat_service_declaration"
/>
<field name="auto_delete" eval="False" />
<field name="lang">{{object.company_id.partner_id.lang}}</field>
<field name="email_from">{{object.company_id.email}}</field>
<field
name="partner_to"
>{{', '.join([str(user.partner_id.id) for user in object.company_id.intrastat_remind_user_ids])}}</field>
<field name="use_default_to" eval="False" />
<field
name="subject"
>DES {{object.year_month}} for {{object.company_id.name}}</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
<p
style="margin: 0px; padding: 0px; font-size: 12px; font-family: Arial, Helvetica, sans-serif"
>I would like to remind you that we are approaching the deadline for the DES declaration for month <t
t-out="object.year_month"
/>.<br /><br />

As there were no DES for that month in Odoo, a draft declaration has been generated automatically.<br
/><br />

<t t-if="ctx.get('exception')">
When trying to generate the DES lines, the following error was encountered:<br /><br />

<t t-out="ctx.get('error_msg')" /><br /><br />

You should solve this error, then go to the menu <em
>Invoicing &gt; Reporting &gt; Intrastat &gt; DES</em>, open the declaration of month <t
t-out="object.year_month"
/> and click on the button <em>Re-generate lines</em>.<br /><br />
</t>

<t t-else="">
<t t-if="object.num_decl_lines">
This draft DES contains <t
t-out="object.num_decl_lines"
/> line(s) and the total amount is <t
t-out="format_amount(object.total_amount, object.currency_id)"
/>.<br /><br />
</t>
<t t-else="">
This draft DES generated automatically by Odoo doesn't contain any line.<br /><br />
</t>

Go and check this declaration in the menu <em
>Invoicing &gt; Reporting &gt; Intrastat &gt; DES</em>.<br /><br />

</t>
</p>

<p
style="margin: 0px; padding: 0px; font-size: 10px; font-family: 'Courier New', Courier, Prestige, monospace"
>
-- <br />
Automatic e-mail sent by Odoo.
</p>
</div>
</field>
</record>
</odoo>
Loading