From b2cd9f7b3521667f670f9c3f1581c08e79bf142f Mon Sep 17 00:00:00 2001
From: Luc De Meyer
Date: Fri, 11 Dec 2020 18:05:26 +0100
Subject: [PATCH] [13.0]invoice_date -> date
---
intrastat_product/README.rst | 7 +++++
intrastat_product/__manifest__.py | 2 +-
.../models/intrastat_product_declaration.py | 10 ++++---
intrastat_product/readme/ROADMAP.rst | 3 +++
.../static/description/index.html | 26 ++++++++++++-------
5 files changed, 33 insertions(+), 15 deletions(-)
create mode 100644 intrastat_product/readme/ROADMAP.rst
diff --git a/intrastat_product/README.rst b/intrastat_product/README.rst
index 9d61b10..494c08c 100644
--- a/intrastat_product/README.rst
+++ b/intrastat_product/README.rst
@@ -102,6 +102,13 @@ and adapt the code for the specific needs of your country.
Cf. l10n_be_istrastat_product as example, replace "be" by your Country Code.
+Known issues / Roadmap
+======================
+
+The declaration is based upon the invoices of the corresponding tax declaration period.
+
+An option to generate the intrastat declaration based upon the dates of the physical movements of goods is currently not available.
+
Bug Tracker
===========
diff --git a/intrastat_product/__manifest__.py b/intrastat_product/__manifest__.py
index f47596b..e372df0 100644
--- a/intrastat_product/__manifest__.py
+++ b/intrastat_product/__manifest__.py
@@ -7,7 +7,7 @@
{
"name": "Intrastat Product",
- "version": "13.0.1.1.1",
+ "version": "13.0.1.1.2",
"category": "Intrastat",
"license": "AGPL-3",
"summary": "Base module for Intrastat Product",
diff --git a/intrastat_product/models/intrastat_product_declaration.py b/intrastat_product/models/intrastat_product_declaration.py
index b33bc4a..fcbcb79 100644
--- a/intrastat_product/models/intrastat_product_declaration.py
+++ b/intrastat_product/models/intrastat_product_declaration.py
@@ -350,7 +350,7 @@ class IntrastatProductDeclaration(models.Model):
inv_line.price_subtotal,
self.company_id.currency_id,
self.company_id,
- invoice.invoice_date,
+ invoice.date,
)
return amount
@@ -473,12 +473,14 @@ class IntrastatProductDeclaration(models.Model):
Complete this method in the localization module
with the country-specific logic for arrivals and dispatches.
Cf. l10n_be_intrastat_product_declaration for an example
+ The dates are based on account.move,date in stead of invoice_date
+ to ensure consistency between intrastat and intracomm tax declaration.
"""
start_date = date(int(self.year), int(self.month), 1)
end_date = start_date + relativedelta(day=1, months=+1, days=-1)
domain = [
- ("invoice_date", ">=", start_date),
- ("invoice_date", "<=", end_date),
+ ("date", ">=", start_date),
+ ("date", "<=", end_date),
("state", "=", "posted"),
("intrastat_country", "=", True),
("company_id", "=", self.company_id.id),
@@ -539,7 +541,7 @@ class IntrastatProductDeclaration(models.Model):
inv_line.price_subtotal,
self.company_id.currency_id,
self.company_id,
- invoice.invoice_date,
+ invoice.date,
)
total_inv_accessory_costs_cc += acost
diff --git a/intrastat_product/readme/ROADMAP.rst b/intrastat_product/readme/ROADMAP.rst
new file mode 100644
index 0000000..6f75021
--- /dev/null
+++ b/intrastat_product/readme/ROADMAP.rst
@@ -0,0 +1,3 @@
+The declaration is based upon the invoices of the corresponding tax declaration period.
+
+An option to generate the intrastat declaration based upon the dates of the physical movements of goods is currently not available.
diff --git a/intrastat_product/static/description/index.html b/intrastat_product/static/description/index.html
index 7a63185..eaa3320 100644
--- a/intrastat_product/static/description/index.html
+++ b/intrastat_product/static/description/index.html
@@ -384,11 +384,12 @@ the module for the Intrastat Product Declaration for Belgium
Installation
Configuration
Usage
-Bug Tracker
-Credits
@@ -444,8 +445,13 @@ the customization or new method is required for multiple countries).
+
+
+
The declaration is based upon the invoices of the corresponding tax declaration period.
+
An option to generate the intrastat declaration based upon the dates of the physical movements of goods is currently not available.
+
-
+
Bugs are tracked on GitHub 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
@@ -453,9 +459,9 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
Do not contact contributors directly about support or help with technical issues.
-
+
-
+
- brain-tec AG
- Akretion
@@ -463,14 +469,14 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
-
+
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose