[13.0]invoice_date -> date

This commit is contained in:
Luc De Meyer
2020-12-11 18:05:26 +01:00
committed by João Marques
parent bcb71216c0
commit b2cd9f7b35
5 changed files with 33 additions and 15 deletions

View File

@@ -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
===========

View File

@@ -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",

View File

@@ -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

View File

@@ -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.

View File

@@ -384,11 +384,12 @@ the module for the Intrastat Product Declaration for Belgium</li>
<li><a class="reference internal" href="#installation" id="id1">Installation</a></li>
<li><a class="reference internal" href="#configuration" id="id2">Configuration</a></li>
<li><a class="reference internal" href="#usage" id="id3">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="id4">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id5">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id6">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id7">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id8">Maintainers</a></li>
<li><a class="reference internal" href="#known-issues-roadmap" id="id4">Known issues / Roadmap</a></li>
<li><a class="reference internal" href="#bug-tracker" id="id5">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id6">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id7">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id8">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id9">Maintainers</a></li>
</ul>
</li>
</ul>
@@ -444,8 +445,13 @@ the customization or new method is required for multiple countries).</p>
</li>
</ul>
</div>
<div class="section" id="known-issues-roadmap">
<h1><a class="toc-backref" href="#id4">Known issues / Roadmap</a></h1>
<p>The declaration is based upon the invoices of the corresponding tax declaration period.</p>
<p>An option to generate the intrastat declaration based upon the dates of the physical movements of goods is currently not available.</p>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id4">Bug Tracker</a></h1>
<h1><a class="toc-backref" href="#id5">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/intrastat-extrastat/issues">GitHub Issues</a>.
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
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#id5">Credits</a></h1>
<h1><a class="toc-backref" href="#id6">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#id6">Authors</a></h2>
<h2><a class="toc-backref" href="#id7">Authors</a></h2>
<ul class="simple">
<li>brain-tec AG</li>
<li>Akretion</li>
@@ -463,14 +469,14 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#id7">Contributors</a></h2>
<h2><a class="toc-backref" href="#id8">Contributors</a></h2>
<ul class="simple">
<li>Alexis de Lattre, Akretion &lt;<a class="reference external" href="mailto:alexis.delattre&#64;akretion.com">alexis.delattre&#64;akretion.com</a>&gt;</li>
<li>Luc De Meyer, Noviat &lt;<a class="reference external" href="mailto:info&#64;noviat.com">info&#64;noviat.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id8">Maintainers</a></h2>
<h2><a class="toc-backref" href="#id9">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose