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

[18.0][MIG] l10n_fr_intrastat_service #603

Open
wants to merge 151 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
dd45ca6
Initial commit of the entirely new code for report_intrastat for France.
Mar 27, 2011
2de9033
Better performances : we now use multi= to compute numbers of lines a…
Mar 27, 2011
e0f8ec8
Add currency in view via a fields.related on report_intrastat_service…
Mar 27, 2011
198a9be
View style update
Mar 27, 2011
a3290c1
Started work on l10n_fr_intrastat_product
Mar 31, 2011
76df9ce
First alpha version of the new module "l10n_fr_intrastat_product". Fi…
Apr 1, 2011
742483c
More work on full DEB+DES implementation. Added full support for "tra…
Apr 3, 2011
91212cb
Converted some fields on report_intrastat_product/service to many2one…
Apr 4, 2011
225df19
Complete change of design for intrastat_type ! Now that report_intras…
Apr 4, 2011
0dd107b
Renamed some fields Now manages the specifications of the different p…
Apr 5, 2011
d9f82e5
"Date done" converted to date + time. Re-order fields in intrastat_se…
Apr 6, 2011
f15c6e5
Removed from prints (not all yet)
Apr 7, 2011
3ae2401
Removed unused code in SQL query (this "id" field was required when i…
Apr 9, 2011
a63936f
Full re-design of intrastat types : probably requires deleting the re…
Apr 18, 2011
ef0de61
Moved some demo data from l10n_fr_intrastat_product to intrastat_base…
Apr 26, 2011
dc97bd8
Moved the field exclude_from_intrastat_if_present of account.tax from…
May 9, 2011
1eaadf6
Update of some strings before translation. Started translation work.
Jun 10, 2011
5681810
Translation and strings update. Add demo data.
Aug 16, 2011
4b71cdf
Port to OpenERP v6 Add seach views for Intrastat product and Intrasta…
Aug 16, 2011
fd3751e
l10n_fr_intrastat_service : Moved the raise if the Partner VAT number…
Sep 5, 2011
887a5d4
Update translations.
Sep 9, 2011
33bf42a
Updated licence pointer.
Jan 30, 2012
41cf33e
Add option "is_accessory_cost" on product.template : If the invoice h…
Jun 5, 2012
f2e8338
Update FR translation.
Jun 5, 2012
aa4698a
Code clean-up : - context is not passed in constraints - don't use la…
Nov 27, 2012
c5ff7c5
IMPORTANT CHANGE : - All EU countries should now be intrastat=True, i…
Apr 23, 2013
9211b18
Initial port to v7.0. Not tested a lot for the moment.
Apr 24, 2013
6640f0f
Introduce a big hack to make the fields added on stock.picking work R…
May 1, 2013
fbe235d
Adapt views to new v7.0 style. Replace "note" field by the mail.threa…
May 7, 2013
2b9ff2d
Handle the case where we have in an invoice : - some HW products with…
May 14, 2013
166db73
Use the GREAT feature widget="monetary"
May 17, 2013
d23bb8f
Should now be compatible with both OCB and RS-OCB Add field import_ob…
Jun 3, 2013
03d5fd4
Add an e-mail reminder for l10n_fr_intrastat_product and l10n_fr_intr…
Aug 26, 2013
ea956b6
Fix to make the module truly usable when user is not part of the grou…
Oct 23, 2013
dde83cb
Add ir.rule for multi-company. Better "OpenERP v7 style/ergonomy" for…
Feb 1, 2014
282c7b4
Only send reminder for French companies.
Mar 8, 2014
f48712f
Use l10n_fr_* : use the method _company_default_get() intrastat_base …
Apr 14, 2014
d3d2554
Add context in on_change (to be able to use web_context_tunnel) XSD f…
Apr 14, 2014
744bfb0
l10n_fr_intrastat_service : update POT file and FR translation. l10n_…
Apr 14, 2014
08c5b1e
Continue the work on port to v8.0
Jul 3, 2014
b17632a
Add intrastat_type_data and update demo data accordingly Remove versi…
Jul 3, 2014
2b2f568
When the obligation level for import is none, the type of the DEB is …
Oct 30, 2014
aca98bd
Add module intrastat_product. Rename report.intrastat.product to l10n…
Nov 28, 2014
b87d2ea
Forgot rename of model in service reminder file
Dec 26, 2014
ab98e1e
intrastat_base + l10n_fr_intrastat_service : port to new API
Dec 26, 2014
df2f80c
Continue the port to the new API Access for intrastat report to accou…
Feb 7, 2015
daa9a91
Continue port to new API + PEP8. First working version.
Feb 9, 2015
8fe0b7f
Update translation and adapt a few strings
May 11, 2015
df1d8c5
PEP8 compliant Port a line of code that was commented with a TODO
May 11, 2015
e6b99e3
l10n_fr_intrastat_service: update string and translation
May 11, 2015
da24d28
Update FR intrastat module for intrastat v3 !
alexis-via Nov 13, 2015
8926c77
Update views following changes in intrastat_product
alexis-via Nov 17, 2015
b25b91d
Add migration script for DES
alexis-via Dec 15, 2015
adcc659
The field exclude_from_intrastat has been removed
alexis-via Apr 1, 2016
0a110b1
Add test suite for DES
alexis-via Apr 14, 2016
bf37483
More demo data, more in-depth testing
alexis-via Apr 15, 2016
fdbc121
Cosmetic update
alexis-via Apr 15, 2016
87d7f74
Add message in chatter when generating lines from invoices
alexis-via Apr 16, 2016
87a2168
Fix DES mail template (field num_decl_lines)
alexis-via Jan 17, 2017
da61a14
Port l10n_fr_intrastat_service to v10
alexis-via Jan 18, 2017
6356c58
Update README for DEB and DES
alexis-via Mar 8, 2017
c7ec05b
Suggestions of David Beal: remove @api.multi (default in v10) and use…
alexis-via Mar 8, 2017
f9bf69f
Put DEB menu before DES menu
alexis-via Mar 8, 2017
d4a6623
Update README for DES
alexis-via Apr 25, 2017
6ddd337
OCA Transbot updated translations from Transifex
oca-transbot May 1, 2017
62ccd8d
Fix new flake8 errors (E722 do not use bare except)
guewen Oct 24, 2017
c5a2db3
DES: improve error messages
alexis-via Mar 7, 2018
84cfeba
remove obsolete .pot files [ci skip]
sbidoul Jun 15, 2018
221116b
Update l10n_fr_intrastat_service.pot
oca-travis Jun 22, 2018
e3cf3d3
IMP add buttons to jump into prodouane site
bealdav Nov 7, 2018
767a0b8
Update l10n_fr_intrastat_service.pot
oca-travis Nov 7, 2018
aa74721
Update translation files
oca-transbot Dec 9, 2018
9df07df
icon.png
OCA-git-bot Apr 3, 2019
08eeed0
[MIG] l10n_fr_intrastat_service from v10 to v12
alexis-via Apr 12, 2019
336a054
PEP8 fix
alexis-via Apr 12, 2019
2c890a1
[FIX] Intrastat Service: positional argument in message_post
ThomasBinsfeld May 10, 2019
3820f13
[IMP] Intrastat Service: use commercial partner
ThomasBinsfeld May 13, 2019
b45daeb
[UPD] README.rst
OCA-git-bot May 15, 2019
5f545f6
[UPD] README.rst
OCA-git-bot Jul 29, 2019
aa4e99c
[UPD] Update l10n_fr_intrastat_service.pot
oca-travis Jul 29, 2019
4c8d52c
Update translation files
oca-transbot Jul 29, 2019
395538a
[MIG] l10n_fr_intrastat_service to v13
alexis-via Jun 7, 2020
038fbb7
DES: black, isort, ...
alexis-via Jun 7, 2020
55a33aa
[UPD] README.rst
OCA-git-bot Jun 8, 2020
0c65907
DES: up-port xlsx report from v10
alexis-via Jun 8, 2020
a278509
DES: Improve code for the loop on invoice lines
alexis-via Jun 9, 2020
ebe5819
Update translation files
oca-transbot Aug 16, 2020
443ba84
[MIG] l10n_fr_intrastat_service from v13 to v14
alexis-via Oct 14, 2020
3ce1571
DES: use the new field intrastat_fiscal_position
alexis-via Jan 5, 2021
407fee9
DES: mig XLSX export
alexis-via Jan 5, 2021
4d4ff55
DES: add support for Brexit
alexis-via Jan 22, 2021
a356f24
[UPD] README.rst
OCA-git-bot Feb 1, 2021
f85c743
l10n_fr_intrastat_service: improve DES tree view
alexis-via Jun 7, 2021
66d38ee
[REF] Fix pre-commit ignoring modules
legalsylvain Aug 10, 2021
48e9cfd
[UPD] README.rst
OCA-git-bot Aug 10, 2021
bc7ed36
l10n_fr_intrastat_service 14.0.1.0.1
OCA-git-bot Aug 10, 2021
6948b0e
Restore tests and remove Alpha status
alexis-via Sep 1, 2021
f56971c
[UPD] Update l10n_fr_intrastat_service.pot
oca-travis Sep 2, 2021
5ac030a
[UPD] README.rst
OCA-git-bot Sep 2, 2021
c68a6d4
l10n_fr_intrastat_service 14.0.1.0.2
OCA-git-bot Sep 2, 2021
d0d8e6e
Update translation files
oca-transbot Sep 2, 2021
18b9054
intrastat: adapt to changes in OCA/intrastat-extrastat
alexis-via Dec 15, 2021
effc0b1
[UPD] Update l10n_fr_intrastat_service.pot
oca-travis Jan 11, 2022
55b83f0
Update translation files
oca-transbot Jan 11, 2022
6fe56bb
[FIX] l10n_fr_intrastat_service: fix reminder email
alexis-via Jan 28, 2022
1054036
l10n_fr_intrastat_service 14.0.1.1.0
OCA-git-bot Apr 15, 2022
fc28bbb
Translated using Weblate (Italian)
francesco-ooops May 18, 2022
c0f3193
l10n_fr_intrastat_* : update, improve and simplify
alexis-via Nov 4, 2022
33a17bb
l10n_fr_intrastat_service: fix mail.template for reminder
alexis-via Jan 12, 2023
d02a5a7
emebi: adapt to new warn msg code
alexis-via Jan 24, 2023
14e0ae4
DES: fix and improve tests
alexis-via Jan 30, 2023
8d756e0
[MIG] l10n_fr_intrastat_service to v16
alexis-via Jan 30, 2023
a5008dd
des: adapt to changes in intrastat_base
alexis-via Feb 8, 2023
03f2d79
[UPD] Update l10n_fr_intrastat_service.pot
Mar 6, 2023
6ba161b
[UPD] README.rst
OCA-git-bot Mar 6, 2023
d70dba1
Update translation files
weblate Mar 6, 2023
40e9bea
Translated using Weblate (Italian)
mymage Mar 23, 2023
c678e63
[UPD] Update l10n_fr_intrastat_service.pot
Jun 8, 2023
d8bbb45
Update translation files
weblate Jun 8, 2023
96c1b53
DES: fix mail template syntax
alexis-via Jun 8, 2023
aa284ba
Translated using Weblate (French)
Jun 8, 2023
6665786
[UPD] Update l10n_fr_intrastat_service.pot
Jun 8, 2023
2ea5026
l10n_fr_intrastat_service 16.0.1.1.0
OCA-git-bot Jun 8, 2023
7746f7a
Update translation files
weblate Jun 8, 2023
14a9fa8
[FIX] EMEBI/DES: update mail templates
alexis-via Jun 20, 2023
e718683
l10n_fr_intrastat_service 16.0.1.2.0
OCA-git-bot Jun 20, 2023
6ae5ad8
intrastat: set lang in mail template
alexis-via Jun 20, 2023
e89b9a2
[UPD] Update l10n_fr_intrastat_service.pot
Sep 2, 2023
c501ae5
[UPD] README.rst
OCA-git-bot Sep 3, 2023
56b30ef
Translated using Weblate (Spanish)
Ivorra78 Aug 21, 2023
74eb944
Update translation files
weblate Sep 3, 2023
1e5d206
Translated using Weblate (Spanish)
Ivorra78 Sep 4, 2023
923cbf7
Translated using Weblate (Spanish)
Ivorra78 Sep 15, 2023
1328962
Update translation files
weblate Oct 9, 2023
9fed22e
[UPD] Update l10n_fr_intrastat_service.pot
Oct 27, 2023
caea4ea
Update translation files
weblate Oct 31, 2023
d6f2064
[BOT] post-merge updates
OCA-git-bot Oct 31, 2023
e718162
DES: use lxml objectify to improve readability of XML generation
alexis-via Nov 22, 2023
b125e9a
[BOT] post-merge updates
OCA-git-bot Nov 28, 2023
1f3b510
l10n_fr_intrastat_service: code cleanup
alexis-via Jan 19, 2024
93671c8
l10n_fr_intrastat_service: pre-commit auto fixes
alexis-via Jan 19, 2024
9582657
[MIG] l10n_fr_intrastat_service to v17
alexis-via Jan 19, 2024
0aeacfe
[UPD] Update l10n_fr_intrastat_service.pot
Feb 12, 2024
0395988
[BOT] post-merge updates
OCA-git-bot Feb 12, 2024
1edb54f
Update translation files
weblate Feb 12, 2024
06af8b8
Update translation files
weblate Feb 12, 2024
fae89a1
Translated using Weblate (Spanish)
Ivorra78 Feb 16, 2024
0cf8b29
[UPD] Update l10n_fr_intrastat_service.pot
Sep 28, 2024
d37b193
Update translation files
weblate Sep 28, 2024
c5765ce
[IMP] l10n_fr_intrastat_service: pre-commit fixes
alexis-via Jan 3, 2025
dd51857
[MIG] l10n_fr_intrastat_service: migrate to v18
alexis-via Jan 4, 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
104 changes: 104 additions & 0 deletions l10n_fr_intrastat_service/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
===
DES
===

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

.. |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/18.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-18-0/l10n-france-18-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=18.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:%2018.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/18.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": "18.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": ["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>
70 changes: 70 additions & 0 deletions l10n_fr_intrastat_service/data/mail_template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?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="email_to">{{object.company_id.intrastat_email_list}}</field>
<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
Loading