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

[16.0][MIG] l10n_fr_intrastat_product #441

Closed
wants to merge 182 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
182 commits
Select commit Hold shift + click to select a range
4c3ff50
Started work on l10n_fr_intrastat_product
Mar 31, 2011
d7eb975
First alpha version of the new module "l10n_fr_intrastat_product". Fi…
Apr 1, 2011
c9478a8
More work on full DEB+DES implementation. Added full support for "tra…
Apr 3, 2011
e63133a
Converted some fields on report_intrastat_product/service to many2one…
Apr 4, 2011
eb2e9d5
In report_intrastat_product_line, remplace the 2 country fields from …
Apr 4, 2011
43c81d4
Complete change of design for intrastat_type ! Now that report_intras…
Apr 4, 2011
d9534c6
Renamed some fields Now manages the specifications of the different p…
Apr 5, 2011
8ef172c
"Date done" converted to date + time. Re-order fields in intrastat_se…
Apr 6, 2011
ec3b661
Better interface when entering DEB lines manually. Commit before I br…
Apr 6, 2011
b02912b
Brand new XML view for intrastat_product, for better usability (dynam…
Apr 6, 2011
3f93315
Move the check on weight higher in the code to avoid a crash when wei…
Apr 7, 2011
95f03c1
Removed from prints (not all yet)
Apr 7, 2011
84ee593
Error in the inherit of view, which can cause a crash in the product …
Apr 8, 2011
d1672df
Desactivate a check temporaryly.
Apr 8, 2011
f779c27
Add pricelist on res_company to compute the stat value Ability to fac…
Apr 9, 2011
a073896
- demo data : Add department on warehouse - removed the use of "user"…
Apr 9, 2011
440fb6b
Removed unused code in SQL query (this "id" field was required when i…
Apr 9, 2011
d8af4e7
- For "generate lines from picking", exclude picking from sale orders…
Apr 13, 2011
3b44c72
Full re-design of intrastat types : probably requires deleting the re…
Apr 18, 2011
61c827b
New important feature : ability to exlude invoice lines that have a s…
Apr 20, 2011
b6e9eef
Label updated.
Apr 20, 2011
e75f170
Bug when opening picking.
Apr 20, 2011
6ed2479
Support for some triangular operations (not all yet) [FIX] an issue w…
Apr 21, 2011
314b8ad
Moved some demo data from l10n_fr_intrastat_product to intrastat_base…
Apr 26, 2011
3a0492d
Moved the field exclude_from_intrastat_if_present of account.tax from…
May 9, 2011
9eedee2
User interface enhancements.
May 9, 2011
b3da021
Remove check that would block the manual creation of intrastat produc…
May 9, 2011
ecc9bd8
More fixes in manual creation of DEB lines (more to come...)
May 9, 2011
7540d97
partner VAT is now saved when entering the DEB line manually.
May 9, 2011
2813eb4
It is now possible to set the H.S. code on the product category. Some…
May 15, 2011
8455419
. Implemented the fiscal representative : for example, when you ship …
Jun 6, 2011
52a2aec
Update of some strings before translation. Started translation work.
Jun 10, 2011
4627684
Better error message when fiscal rep is missing.
Jun 10, 2011
34aca57
Some fixes in strings. Finished translation to French.
Jul 8, 2011
140086b
Add missing import
Jul 8, 2011
8b6f59d
Modify demo data.
Jul 8, 2011
6e4b2b8
Translation and strings update. Add demo data.
Aug 16, 2011
5f70c25
Port to OpenERP v6 Add seach views for Intrastat product and Intrasta…
Aug 16, 2011
e531a4f
Remove select="2", which is useless in v6
Aug 17, 2011
b68e0ac
l10n_fr_intrastat_service : Moved the raise if the Partner VAT number…
Sep 5, 2011
54311e5
Same modification as my previous commit for DEB : when we sell to a p…
Sep 7, 2011
8a48b64
Update translations.
Sep 9, 2011
85909f0
Updated licence pointer.
Jan 30, 2012
4e95e3a
Copy-paste comment error fixed !
Jan 30, 2012
adf39e2
Now manage UoM other than PCE. If the UoM required by the H.S. code i…
Feb 27, 2012
cd78740
Longer description for HS code.
Mar 14, 2012
38a2e9d
Now support weight computation when UoM category is "Unit" and UoM !=…
Mar 14, 2012
d0a156c
Fixes bug 955065 : don't declare DEB lines with value = 0
Mar 14, 2012
f1b1e13
l10n_fr_intrastat_product - SaleOrder's method action_invoice_create …
yvaucher May 10, 2012
1a7c374
Add option "is_accessory_cost" on product.template : If the invoice h…
Jun 5, 2012
e45b31b
Update FR translation.
Jun 5, 2012
14167c6
Add demo value for department.
Jun 7, 2012
e38aa97
Do not inherit action_invoice_create in sale.py and stock.py We now i…
Jun 7, 2012
59f8e72
Use the new logger API of OpenERP 6.1 Move the "EU fiscal representat…
Jul 16, 2012
c37e635
Rewrote the constraint of product.supplierinfo, for better perfs. Tha…
Sep 24, 2012
24c1eb6
Code clean-up : - context is not passed in constraints - don't use la…
Nov 27, 2012
8e328e8
IMPORTANT CHANGE : - All EU countries should now be intrastat=True, i…
Apr 23, 2013
04c3910
As stated in BOD dated 05/01/2012, mouvements for repairs are not req…
Apr 23, 2013
4d2e2c7
Initial port to v7.0. Not tested a lot for the moment.
Apr 24, 2013
285de8d
Continue removal of mouvements for repairs (cf BOD dated 05/01/2012)
Apr 24, 2013
4ad9ae7
Fix wrong code.
May 1, 2013
8791e57
Introduce a big hack to make the fields added on stock.picking work R…
May 1, 2013
f2b15c1
Adapt views to new v7.0 style. Replace "note" field by the mail.threa…
May 7, 2013
fa1fc10
Handle the case where an invoice has products with 0 value and access…
May 16, 2013
ad6e4cf
Use the GREAT feature widget="monetary"
May 17, 2013
74c41bc
on picking, address_id -> partner_id
May 17, 2013
89ea6af
Should now be compatible with both OCB and RS-OCB Add field import_ob…
Jun 3, 2013
0f8ad2d
Crash on intrastat_product.py line 334 reported by Frederic Clementi.
Jun 9, 2013
cebade3
Add an e-mail reminder for l10n_fr_intrastat_product and l10n_fr_intr…
Aug 26, 2013
e0de12c
Better form view of product category, courtesy of David Beal.
Aug 26, 2013
37f00c1
Add the H.S. code description in the display name of the H.S. code
Sep 27, 2013
fc29a34
Fix to make the module truly usable when user is not part of the grou…
Oct 23, 2013
c1934c9
Remove irrelevant comment.
Dec 15, 2013
475d9b1
Add ir.rule for multi-company. Better "OpenERP v7 style/ergonomy" for…
Feb 1, 2014
74de3e7
Only send reminder for French companies.
Mar 8, 2014
02c1e02
Use l10n_fr_* : use the method _company_default_get() intrastat_base …
Apr 14, 2014
ec304fd
Add context in on_change (to be able to use web_context_tunnel) XSD f…
Apr 14, 2014
6e57839
Set fields country_id and intrastat_id invisible when type = service.
Apr 14, 2014
460ecce
l10n_fr_intrastat_service : update POT file and FR translation. l10n_…
Apr 14, 2014
07e8be4
Continue the work on port to v8.0
Jul 3, 2014
b848225
Add intrastat_type_data and update demo data accordingly Remove versi…
Jul 3, 2014
2a593aa
Update graph view for intrastat.product, to split between import and …
Jul 3, 2014
ef22922
Inherit the new _prepare method that has been introduced in v8.0 for …
Jul 5, 2014
ff0c2b3
When the obligation level for import is none, the type of the DEB is …
Oct 30, 2014
f71dc03
Add module intrastat_product. Rename report.intrastat.product to l10n…
Nov 28, 2014
695d26b
Rename field country_id to origin_country_id (TODO : write mig script…
Dec 1, 2014
77d473c
Take into accout the remarks of Guewen
Dec 12, 2014
b2e11e9
Move intrastat_code and uom_id of report.intrastat.code from l10n_fr_…
Dec 13, 2014
ac4b343
intrastat_base + l10n_fr_intrastat_service : port to new API
Dec 26, 2014
0cbdfe9
Continue the move to the new API/flake8
Dec 29, 2014
407d705
Port intrastat.type to the new API
Dec 31, 2014
97be5d2
Make dutch ICP report workable on odoo 8.0 [FIX] Some small changes i…
NL66278 Feb 4, 2015
004a2ea
Continue the port to the new API Access for intrastat report to accou…
Feb 7, 2015
df4899a
Continue port to new API + PEP8. First working version.
Feb 9, 2015
7cab652
FIX validation of department
Feb 10, 2015
d52de72
Fix a crash in Import DEB Update strings
May 10, 2015
f294e24
Update translation and adapt a few strings
May 11, 2015
a7a32e9
PEP8 compliant Port a line of code that was commented with a TODO
May 11, 2015
eb5491d
Remove comment
May 11, 2015
0494b79
Update FR intrastat module for intrastat v3 !
alexis-via Nov 13, 2015
bf6a554
Update views following changes in intrastat_product
alexis-via Nov 17, 2015
bc2da30
FIX XML export for introductions
alexis-via Dec 9, 2015
276306d
Take into accout negative lines in total fiscal amount (régime = 25)
alexis-via Dec 12, 2015
812f25d
Add migration script for DES
alexis-via Dec 15, 2015
d05612e
FIX crash on generate computation lines on arrivals
alexis-via Jan 8, 2016
48c9d06
Add warning when country of origin is missing on arrivals/extended
alexis-via Jan 8, 2016
8903561
Adapt to latest changes in module intrastat_product
alexis-via Jan 10, 2016
7e646c3
Adapt to latest changes in intrastat_product
alexis-via Apr 10, 2016
da0c44a
Remove unused files
alexis-via Apr 28, 2016
af2c935
Fix bug in a constraint in intrastat_transaction.py
alexis-via Jun 13, 2016
f035d86
Remove dead files stock_view.xml and invoice_view.xml
alexis-via Jan 17, 2017
1d114d4
Pylint fixes
alexis-via Jan 17, 2017
08ac2ea
Port l10n_fr_intrastat_service to v10
alexis-via Jan 18, 2017
02f98af
Port DEB to v10
alexis-via Mar 8, 2017
1dc3092
Update README for DEB and DES
alexis-via Mar 8, 2017
a492519
Put DEB menu before DES menu
alexis-via Mar 8, 2017
03d5748
FIX XML file generation for DEB
alexis-via Mar 8, 2017
f2fabee
Add post_install script for easier configuration
alexis-via Mar 8, 2017
5456adb
Add auto-configuration of taxes in post_install script
alexis-via Mar 9, 2017
c99a668
Update README for DES
alexis-via Apr 25, 2017
c90da5b
OCA Transbot updated translations from Transifex
oca-transbot May 1, 2017
86f34c4
OCA Transbot updated translations from Transifex
oca-transbot Dec 2, 2017
5cd4180
Type of invoice in search of DEB lines
alexis-via May 14, 2018
4166cb3
Pylint fixes
alexis-via May 15, 2018
f969457
OCA Transbot updated translations from Transifex
oca-transbot May 19, 2018
b439b2b
remove obsolete .pot files [ci skip]
sbidoul Jun 15, 2018
c743aa2
Update l10n_fr_intrastat_product.pot
oca-travis Jun 22, 2018
f4f4c5e
Restore fields for report (they were dropped during v8 to v10 migration)
alexis-via Jun 22, 2018
14e7ac4
Update l10n_fr_intrastat_product.pot
oca-travis Jul 12, 2018
c5644e4
Source department on arrival DEB
alexis-via Jul 14, 2018
a102314
Update l10n_fr_intrastat_product.pot
oca-travis Jul 27, 2018
366aa0f
l10n_fr_intrastat_product: Migration to 11.0
rvalyi Oct 21, 2018
7710de4
Auto-configure account.tax.template
alexis-via Dec 6, 2018
d7de4cc
FIX email reminder
alexis-via Dec 6, 2018
796b805
DEB reminder
alexis-via Dec 17, 2018
4afbaa0
l10n_fr_intrastat_product: Update FR translation
alexis-via Dec 29, 2018
0a43c1c
Add button "Goto Prodou@ne"
alexis-via Dec 29, 2018
e5d7cea
Update translation files
oca-transbot Mar 3, 2019
1500d54
icon.png
OCA-git-bot Apr 3, 2019
3bb7464
[MIG] l10n_fr_intrastat_product to v12
alexis-via May 28, 2019
083ad17
l10n_fr_intrastat_product: inherit XLSX reports to add FR-specific cols
alexis-via May 29, 2019
72f1296
[UPD] README.rst
OCA-git-bot Jun 3, 2019
7c3c05a
[IMP] Remove l10n_fr_siret dependency
Jun 4, 2019
55f60a7
[UPD] README.rst
OCA-git-bot Jul 29, 2019
e55b461
[UPD] Update l10n_fr_intrastat_product.pot
oca-travis Jul 29, 2019
6c93d89
Update translation files
oca-transbot Jul 29, 2019
ec3cf62
ADD fr_partner_vat to xls report
Jun 24, 2019
e7ace16
[UPD] Update l10n_fr_intrastat_product.pot
oca-travis Feb 1, 2020
94577ec
Update translation files
oca-transbot Feb 1, 2020
84dacfa
FIX non compliant code with oca rules
bealdav Feb 18, 2020
3d2ccc3
[MIG] DEB to v13
alexis-via Jun 8, 2020
3a978e3
DEB: black, isort, ...
alexis-via Jun 8, 2020
42993f9
[UPD] README.rst
OCA-git-bot Jun 23, 2020
258c5af
Update translation files
oca-transbot Aug 16, 2020
0d1635b
[MIG] l10n_fr_intrastat_product to v14
alexis-via Jan 5, 2021
9e12a8b
DEB: Add support for Brexit
alexis-via Jan 22, 2021
d8291c9
[UPD] README.rst
OCA-git-bot Mar 30, 2021
29b794c
[REF] Fix pre-commit ignoring modules
legalsylvain Aug 10, 2021
0f13c45
[UPD] README.rst
OCA-git-bot Aug 10, 2021
9421151
l10n_fr_intrastat_product 14.0.1.0.1
OCA-git-bot Aug 10, 2021
9d65aaf
Restore tests and remove Alpha status
alexis-via Sep 1, 2021
416ce43
[UPD] Update l10n_fr_intrastat_product.pot
oca-travis Sep 2, 2021
dfd80de
[UPD] README.rst
OCA-git-bot Sep 2, 2021
5b41719
l10n_fr_intrastat_product 14.0.1.0.2
OCA-git-bot Sep 2, 2021
f02832f
Update translation files
oca-transbot Sep 2, 2021
abf75a0
Fix travis for SIRET validation
alexis-via Oct 18, 2021
e67dcd4
l10n_fr_intrastat_product 14.0.1.1.0
OCA-git-bot Oct 24, 2021
9512956
[FIX] Crash in DEB XML generation
alexis-via Dec 11, 2021
71afa9a
l10n_fr_intrastat_product 14.0.1.2.0
OCA-git-bot Dec 12, 2021
1d1c9c3
DEB: adapt for January 1st 2022 reform
alexis-via Dec 12, 2021
7e6658e
intrastat: adapt to changes in OCA/intrastat-extrastat
alexis-via Dec 15, 2021
3829cee
[UPD] Update l10n_fr_intrastat_product.pot
oca-travis Jan 11, 2022
6959eb5
l10n_fr_intrastat_product 14.0.2.0.0
OCA-git-bot Jan 11, 2022
f5e0c8c
Update translation files
oca-transbot Jan 11, 2022
249862a
[MIG] l10n_fr_intrastat_product from v14 to v15
alexis-via Jan 31, 2022
a73f4a5
[UPD] Update l10n_fr_intrastat_product.pot
Dec 3, 2022
b80c045
[UPD] README.rst
OCA-git-bot Dec 3, 2022
1a2be6c
Update translation files
weblate Dec 3, 2022
beaf012
Translated using Weblate (Italian)
mymage Mar 23, 2023
21da187
[IMP] l10n_fr_intrastat_product: pre-commit stuff
Apr 18, 2023
c44d03c
[MIG] l10n_fr_intrastat_product: Migration to 16.0
Apr 19, 2023
429c4c7
[DON'T MERGE] test-requirements.txt
Apr 18, 2023
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
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/15.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-15-0/l10n-france-15-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/15.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:%2015.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/15.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
36 changes: 36 additions & 0 deletions l10n_fr_intrastat_product/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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": "DEB",
"version": "16.0.1.0.0",
"category": "Localisation/Report Intrastat",
"license": "AGPL-3",
"summary": "DEB (Déclaration d'Échange de Biens) 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": [
"data/account_fiscal_position_template.xml",
"security/intrastat_product_security.xml",
"security/ir.model.access.csv",
"views/intrastat_product_declaration.xml",
"data/intrastat_transaction.xml",
"views/intrastat_transaction.xml",
"views/intrastat_unit.xml",
"data/intrastat_product_reminder.xml",
"views/res_config_settings.xml",
"views/res_partner.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,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2020 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>
</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>
93 changes: 93 additions & 0 deletions l10n_fr_intrastat_product/data/intrastat_product_reminder.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2013-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).
-->
<odoo>
<data noupdate="1">
<record id="l10n_fr_intrastat_product_cron" model="ir.cron">
<field name="name">DEB 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="numbercall">-1</field>
<field name="model_id" ref="model_l10n_fr_intrastat_product_declaration" />
<field name="state">code</field>
<field name="code">model._scheduler_reminder()</field>
</record>
</data>
<data>
<record
id="l10n_fr_intrastat_product_reminder_email_template"
model="mail.template"
>
<field name="name">DEB Reminder</field>
<field
name="model_id"
ref="l10n_fr_intrastat_product.model_l10n_fr_intrastat_product_declaration"
/>
<field name="auto_delete" eval="False" />
<field
name="email_from"
>{{object.company_id.email or '[email protected]'}}</field>
<field name="email_to">{{object.company_id.intrastat_email_list}}</field>
<field
name="subject"
>{{object.declaration_type}} DEB {{object.year_month}} for {{object.company_id.name}}</field>
<field name="body_html" type="html">
<p
>I would like to remind you that we are approaching the deadline for the DEB for month <strong
t-out="object.year_month"
>2022-01</strong>.</p>

<p>As there were no <t
t-out="object.declaration_type"
>departure</t> DEB for that month in Odoo, a draft <t
t-out="object.declaration_type"
>departure</t> DEB has been generated automatically by Odoo.</p>

<t t-if="ctx.get('exception')">
<p>When trying to generate the lines of the <t
t-out="object.declaration_type"
>departure</t> DEB, the following error was encountered:</p>

<code><t t-out="ctx.get('error_msg')">Missing VAT number on partner 'Azur'.</t></code>

<p
>You should solve this error, then go to the menu "Invoicing > Reporting > Intrastat > DEB", open the <t
t-out="object.declaration_type"
>departure</t> DEB for month <t
t-out="object.year_month"
>2022-01</t> and click on the button <em
>Generate lines from invoices</em>.</p>

</t>
<t t-else="">
<t t-if="object.num_decl_lines > 0">
<p>This draft <t
t-out="object.declaration_type"
>departure</t> DEB contains <t
t-out="object.num_decl_lines"
>3</t> line(s).</p>
</t>
<t t-else="">
<p>This draft <t
t-out="object.declaration_type"
>departure</t> DEB generated automatically by Odoo doesn't contain any line.</p>
</t>

<p>Go and check this declaration in Odoo in the menu <em
>Invoicing > Reporting > Intrastat > DEB</em>.</p>

</t>

<p>
--
Automatic e-mail sent by Odoo.
</p>
</field>
</record>
</data>
</odoo>
Loading