Skip to content

Commit d8b55c9

Browse files
committed
Merge PR #322 into 17.0
Signed-off-by pedrobaeza
2 parents afa3a2d + 52f5b13 commit d8b55c9

5 files changed

Lines changed: 70 additions & 65 deletions

File tree

intrastat_product/README.rst

Lines changed: 34 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
.. image:: https://odoo-community.org/readme-banner-image
2-
:target: https://odoo-community.org/get-involved?utm_source=readme
3-
:alt: Odoo Community Association
4-
51
=================
62
Intrastat Product
73
=================
@@ -17,7 +13,7 @@ Intrastat Product
1713
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
1814
:target: https://odoo-community.org/page/development-status
1915
:alt: Beta
20-
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
2117
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
2218
:alt: License: AGPL-3
2319
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fintrastat--extrastat-lightgray.png?logo=github
@@ -38,10 +34,10 @@ reporting.
3834
It should be used in combination with country-specific Intrastat Product
3935
reporting modules such as:
4036

41-
- *l10n_fr_intrastat_product*: the module for the *Déclaration d'Echange
42-
de Biens* (DEB) for France
43-
- *l10n_be_intrastat_product*: the module for the Intrastat Product
44-
Declaration for Belgium
37+
- *l10n_fr_intrastat_product*: the module for the *Déclaration
38+
d'Echange de Biens* (DEB) for France
39+
- *l10n_be_intrastat_product*: the module for the Intrastat Product
40+
Declaration for Belgium
4541

4642
These country-specific modules can be found in the OCA localization for
4743
those countries.
@@ -94,40 +90,40 @@ We recommend to start by copying an existing module, e.g.
9490
l10n_be_intrastat_product and adapt the code for the specific needs of
9591
your country.
9692

97-
- Declaration Object
93+
- Declaration Object
9894

99-
Create a new class as follows:
95+
Create a new class as follows:
10096

101-
.. code:: python
97+
.. code:: python
10298
103-
class L10nCcIntrastatProductDeclaration(models.Model):
104-
_name = 'l10n.cc.intrastat.product.declaration'
105-
_description = "Intrastat Product Declaration for YourCountry"
106-
_inherit = ['intrastat.product.declaration', 'mail.thread']
99+
class L10nCcIntrastatProductDeclaration(models.Model):
100+
_name = 'l10n.cc.intrastat.product.declaration'
101+
_description = "Intrastat Product Declaration for YourCountry"
102+
_inherit = ['intrastat.product.declaration', 'mail.thread']
107103
108-
whereby cc = your country code
104+
whereby cc = your country code
109105

110-
- Computation & Declaration Lines
106+
- Computation & Declaration Lines
111107

112-
Create also new objects inheriting from the Computation and
113-
Declaration Line Objects so that you can add methods or customise the
114-
methods from the base modules (make a PR when the customization or new
115-
method is required for multiple countries).
108+
Create also new objects inheriting from the Computation and
109+
Declaration Line Objects so that you can add methods or customise the
110+
methods from the base modules (make a PR when the customization or
111+
new method is required for multiple countries).
116112

117-
Adapt also the parent_id fields of the newly created objects (cf.
118-
l10n_be_intrastat_product as example).
113+
Adapt also the parent_id fields of the newly created objects (cf.
114+
l10n_be_intrastat_product as example).
119115

120-
- XML Files: Menu, Action, Views
116+
- XML Files: Menu, Action, Views
121117

122-
Cf. l10n_be_istrastat_product as example, replace "be" by your Country
123-
Code.
118+
Cf. l10n_be_istrastat_product as example, replace "be" by your
119+
Country Code.
124120

125121
**Other functionality added by this module:**
126122

127-
- Compute the Intrastat Lines in an invoice. For this, your user needs
128-
to be in the "Technical / Invoice Intrastat Transaction Details"
129-
group. Go to the "Intrastat transaction details" tab and press
130-
**Compute**
123+
- Compute the Intrastat Lines in an invoice. For this, your user needs
124+
to be in the "Technical / Invoice Intrastat Transaction Details"
125+
group. Go to the "Intrastat transaction details" tab and press
126+
**Compute**
131127

132128
Known issues / Roadmap
133129
======================
@@ -162,16 +158,17 @@ Authors
162158
Contributors
163159
------------
164160

165-
- Alexis de Lattre, Akretion <alexis.delattre@akretion.com>
161+
- Alexis de Lattre, Akretion <alexis.delattre@akretion.com>
166162

167-
- Luc De Meyer, Noviat <info@noviat.com>
163+
- Luc De Meyer, Noviat <info@noviat.com>
168164

169-
- Denis Roussel <denis.roussel@acsone.eu>
165+
- Denis Roussel <denis.roussel@acsone.eu>
170166

171-
- Tecnativa <`www.tecnativa.com\\> <http://www.tecnativa.com\>>`__:
167+
- Tecnativa <`www.tecnativa.com\\> <http://www.tecnativa.com\>>`__:
172168

173-
- João Marques
174-
- Víctor Martínez
169+
- João Marques
170+
- Víctor Martínez
171+
- Juan Carlos Oñate
175172

176173
Maintainers
177174
-----------

intrastat_product/models/intrastat_product_declaration.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,6 @@ def delete_xml(self):
883883
self.ensure_one()
884884
self.xml_attachment_id and self.xml_attachment_id.unlink()
885885

886-
@api.model
887886
def _xls_computation_line_fields(self):
888887
"""
889888
Update list in custom module to add/drop columns or change order
@@ -909,7 +908,6 @@ def _xls_computation_line_fields(self):
909908
"invoice",
910909
]
911910

912-
@api.model
913911
def _xls_declaration_line_fields(self):
914912
"""
915913
Update list in custom module to add/drop columns or change order

intrastat_product/readme/CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88

99
> - João Marques
1010
> - Víctor Martínez
11+
> - Juan Carlos Oñate

intrastat_product/static/description/index.html

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
55
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
6-
<title>README.rst</title>
6+
<title>Intrastat Product</title>
77
<style type="text/css">
88

99
/*
@@ -360,28 +360,23 @@
360360
</style>
361361
</head>
362362
<body>
363-
<div class="document">
363+
<div class="document" id="intrastat-product">
364+
<h1 class="title">Intrastat Product</h1>
364365

365-
366-
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
367-
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
368-
</a>
369-
<div class="section" id="intrastat-product">
370-
<h1>Intrastat Product</h1>
371366
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
372367
!! This file is generated by oca-gen-addon-readme !!
373368
!! changes will be overwritten. !!
374369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375370
!! source digest: sha256:2d0130720dd8fb39832362c656667790eeb9f7db928f355d1b9ed4adb27e0f5d
376371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377-
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/intrastat-extrastat/tree/17.0/intrastat_product"><img alt="OCA/intrastat-extrastat" src="https://img.shields.io/badge/github-OCA%2Fintrastat--extrastat-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/intrastat-extrastat-17-0/intrastat-extrastat-17-0-intrastat_product"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/intrastat-extrastat&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/intrastat-extrastat/tree/17.0/intrastat_product"><img alt="OCA/intrastat-extrastat" src="https://img.shields.io/badge/github-OCA%2Fintrastat--extrastat-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/intrastat-extrastat-17-0/intrastat-extrastat-17-0-intrastat_product"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/intrastat-extrastat&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378373
<p>This module contains common objects and fields for the Intrastat Product
379374
reporting.</p>
380375
<p>It should be used in combination with country-specific Intrastat Product
381376
reporting modules such as:</p>
382377
<ul class="simple">
383-
<li><em>l10n_fr_intrastat_product</em>: the module for the <em>Déclaration d’Echange
384-
de Biens</em> (DEB) for France</li>
378+
<li><em>l10n_fr_intrastat_product</em>: the module for the <em>Déclaration
379+
d’Echange de Biens</em> (DEB) for France</li>
385380
<li><em>l10n_be_intrastat_product</em>: the module for the Intrastat Product
386381
Declaration for Belgium</li>
387382
</ul>
@@ -404,7 +399,7 @@ <h1>Intrastat Product</h1>
404399
</ul>
405400
</div>
406401
<div class="section" id="installation">
407-
<h2><a class="toc-backref" href="#toc-entry-1">Installation</a></h2>
402+
<h1><a class="toc-backref" href="#toc-entry-1">Installation</a></h1>
408403
<p>This module is NOT compatible with the <em>account_intrastat</em> module from
409404
Odoo Enterprise.</p>
410405
<p>We recommended to install the module <strong>product_net_weight</strong> from
@@ -414,7 +409,7 @@ <h2><a class="toc-backref" href="#toc-entry-1">Installation</a></h2>
414409
<em>Weight</em> field.</p>
415410
</div>
416411
<div class="section" id="configuration">
417-
<h2><a class="toc-backref" href="#toc-entry-2">Configuration</a></h2>
412+
<h1><a class="toc-backref" href="#toc-entry-2">Configuration</a></h1>
418413
<p>By default the intrastat declaration is generated based upon the product
419414
record master data. Hence unexpected results may occur in case this
420415
master data is not accurate, e.g. wrong or missing weight, country of
@@ -430,7 +425,7 @@ <h2><a class="toc-backref" href="#toc-entry-2">Configuration</a></h2>
430425
group.</p>
431426
</div>
432427
<div class="section" id="usage">
433-
<h2><a class="toc-backref" href="#toc-entry-3">Usage</a></h2>
428+
<h1><a class="toc-backref" href="#toc-entry-3">Usage</a></h1>
434429
<p>This module is used in combination with the country-specific
435430
localization module(s).</p>
436431
<p><strong>Coding guidelines for localization module:</strong></p>
@@ -441,7 +436,7 @@ <h2><a class="toc-backref" href="#toc-entry-3">Usage</a></h2>
441436
<li><p class="first">Declaration Object</p>
442437
<p>Create a new class as follows:</p>
443438
<pre class="code python literal-block">
444-
<span class="k">class</span><span class="w"> </span><span class="nc">L10nCcIntrastatProductDeclaration</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span><span class="w">
439+
<span class="k">class</span> <span class="nc">L10nCcIntrastatProductDeclaration</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span><span class="w">
445440
</span> <span class="n">_name</span> <span class="o">=</span> <span class="s1">'l10n.cc.intrastat.product.declaration'</span><span class="w">
446441
</span> <span class="n">_description</span> <span class="o">=</span> <span class="s2">&quot;Intrastat Product Declaration for YourCountry&quot;</span><span class="w">
447442
</span> <span class="n">_inherit</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'intrastat.product.declaration'</span><span class="p">,</span> <span class="s1">'mail.thread'</span><span class="p">]</span>
@@ -451,14 +446,14 @@ <h2><a class="toc-backref" href="#toc-entry-3">Usage</a></h2>
451446
<li><p class="first">Computation &amp; Declaration Lines</p>
452447
<p>Create also new objects inheriting from the Computation and
453448
Declaration Line Objects so that you can add methods or customise the
454-
methods from the base modules (make a PR when the customization or new
455-
method is required for multiple countries).</p>
449+
methods from the base modules (make a PR when the customization or
450+
new method is required for multiple countries).</p>
456451
<p>Adapt also the parent_id fields of the newly created objects (cf.
457452
l10n_be_intrastat_product as example).</p>
458453
</li>
459454
<li><p class="first">XML Files: Menu, Action, Views</p>
460-
<p>Cf. l10n_be_istrastat_product as example, replace “be” by your Country
461-
Code.</p>
455+
<p>Cf. l10n_be_istrastat_product as example, replace “be” by your
456+
Country Code.</p>
462457
</li>
463458
</ul>
464459
<p><strong>Other functionality added by this module:</strong></p>
@@ -470,24 +465,24 @@ <h2><a class="toc-backref" href="#toc-entry-3">Usage</a></h2>
470465
</ul>
471466
</div>
472467
<div class="section" id="known-issues-roadmap">
473-
<h2><a class="toc-backref" href="#toc-entry-4">Known issues / Roadmap</a></h2>
468+
<h1><a class="toc-backref" href="#toc-entry-4">Known issues / Roadmap</a></h1>
474469
<p>The declaration is based upon the invoices of the corresponding tax
475470
declaration period.</p>
476471
<p>An option to generate the intrastat declaration based upon the dates of
477472
the physical movements of goods is currently not available.</p>
478473
</div>
479474
<div class="section" id="bug-tracker">
480-
<h2><a class="toc-backref" href="#toc-entry-5">Bug Tracker</a></h2>
475+
<h1><a class="toc-backref" href="#toc-entry-5">Bug Tracker</a></h1>
481476
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/intrastat-extrastat/issues">GitHub Issues</a>.
482477
In case of trouble, please check there if your issue has already been reported.
483478
If you spotted it first, help us to smash it by providing a detailed and welcomed
484479
<a class="reference external" href="https://github.com/OCA/intrastat-extrastat/issues/new?body=module:%20intrastat_product%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
485480
<p>Do not contact contributors directly about support or help with technical issues.</p>
486481
</div>
487482
<div class="section" id="credits">
488-
<h2><a class="toc-backref" href="#toc-entry-6">Credits</a></h2>
483+
<h1><a class="toc-backref" href="#toc-entry-6">Credits</a></h1>
489484
<div class="section" id="authors">
490-
<h3><a class="toc-backref" href="#toc-entry-7">Authors</a></h3>
485+
<h2><a class="toc-backref" href="#toc-entry-7">Authors</a></h2>
491486
<ul class="simple">
492487
<li>ACSONE SA/NV</li>
493488
<li>brain-tec AG</li>
@@ -496,7 +491,7 @@ <h3><a class="toc-backref" href="#toc-entry-7">Authors</a></h3>
496491
</ul>
497492
</div>
498493
<div class="section" id="contributors">
499-
<h3><a class="toc-backref" href="#toc-entry-8">Contributors</a></h3>
494+
<h2><a class="toc-backref" href="#toc-entry-8">Contributors</a></h2>
500495
<ul>
501496
<li><p class="first">Alexis de Lattre, Akretion &lt;<a class="reference external" href="mailto:alexis.delattre&#64;akretion.com">alexis.delattre&#64;akretion.com</a>&gt;</p>
502497
</li>
@@ -509,13 +504,14 @@ <h3><a class="toc-backref" href="#toc-entry-8">Contributors</a></h3>
509504
<ul class="simple">
510505
<li>João Marques</li>
511506
<li>Víctor Martínez</li>
507+
<li>Juan Carlos Oñate</li>
512508
</ul>
513509
</blockquote>
514510
</li>
515511
</ul>
516512
</div>
517513
<div class="section" id="maintainers">
518-
<h3><a class="toc-backref" href="#toc-entry-9">Maintainers</a></h3>
514+
<h2><a class="toc-backref" href="#toc-entry-9">Maintainers</a></h2>
519515
<p>This module is maintained by the OCA.</p>
520516
<a class="reference external image-reference" href="https://odoo-community.org">
521517
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
@@ -528,6 +524,5 @@ <h3><a class="toc-backref" href="#toc-entry-9">Maintainers</a></h3>
528524
</div>
529525
</div>
530526
</div>
531-
</div>
532527
</body>
533528
</html>

intrastat_product/views/intrastat_product_declaration.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,4 +523,18 @@
523523
</tree>
524524
</field>
525525
</record>
526+
<record
527+
id="intrastat_product_intrastat_product_declaration_action"
528+
model="ir.actions.act_window"
529+
>
530+
<field name="name">Intrastat Product Declaration</field>
531+
<field name="res_model">intrastat.product.declaration</field>
532+
<field name="view_mode">tree,form,graph,pivot</field>
533+
</record>
534+
<menuitem
535+
id="intrastat_product_intrastat_product_declaration_menu"
536+
parent="intrastat_base.menu_intrastat_base_root"
537+
action="intrastat_product_intrastat_product_declaration_action"
538+
sequence="10"
539+
/>
526540
</odoo>

0 commit comments

Comments
 (0)