Skip to content

Commit 3ccd0dd

Browse files
[IMP] intrastat_product: Add menu to avoid redundancy
TT55417
1 parent b16a042 commit 3ccd0dd

4 files changed

Lines changed: 55 additions & 38 deletions

File tree

intrastat_product/README.rst

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ reporting.
3434
It should be used in combination with country-specific Intrastat Product
3535
reporting modules such as:
3636

37-
- *l10n_fr_intrastat_product*: the module for the *Déclaration d'Echange
38-
de Biens* (DEB) for France
39-
- *l10n_be_intrastat_product*: the module for the Intrastat Product
40-
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
4141

4242
These country-specific modules can be found in the OCA localization for
4343
those countries.
@@ -90,40 +90,40 @@ We recommend to start by copying an existing module, e.g.
9090
l10n_be_intrastat_product and adapt the code for the specific needs of
9191
your country.
9292

93-
- Declaration Object
93+
- Declaration Object
9494

95-
Create a new class as follows:
95+
Create a new class as follows:
9696

97-
.. code:: python
97+
.. code:: python
9898
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']
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']
103103
104-
whereby cc = your country code
104+
whereby cc = your country code
105105

106-
- Computation & Declaration Lines
106+
- Computation & Declaration Lines
107107

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 new
111-
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).
112112

113-
Adapt also the parent_id fields of the newly created objects (cf.
114-
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).
115115

116-
- XML Files: Menu, Action, Views
116+
- XML Files: Menu, Action, Views
117117

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

121121
**Other functionality added by this module:**
122122

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**
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**
127127

128128
Known issues / Roadmap
129129
======================
@@ -158,16 +158,17 @@ Authors
158158
Contributors
159159
------------
160160

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

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

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

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

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

172173
Maintainers
173174
-----------

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: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@ <h1 class="title">Intrastat Product</h1>
375375
<p>It should be used in combination with country-specific Intrastat Product
376376
reporting modules such as:</p>
377377
<ul class="simple">
378-
<li><em>l10n_fr_intrastat_product</em>: the module for the <em>Déclaration d’Echange
379-
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>
380380
<li><em>l10n_be_intrastat_product</em>: the module for the Intrastat Product
381381
Declaration for Belgium</li>
382382
</ul>
@@ -446,14 +446,14 @@ <h1><a class="toc-backref" href="#toc-entry-3">Usage</a></h1>
446446
<li><p class="first">Computation &amp; Declaration Lines</p>
447447
<p>Create also new objects inheriting from the Computation and
448448
Declaration Line Objects so that you can add methods or customise the
449-
methods from the base modules (make a PR when the customization or new
450-
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>
451451
<p>Adapt also the parent_id fields of the newly created objects (cf.
452452
l10n_be_intrastat_product as example).</p>
453453
</li>
454454
<li><p class="first">XML Files: Menu, Action, Views</p>
455-
<p>Cf. l10n_be_istrastat_product as example, replace “be” by your Country
456-
Code.</p>
455+
<p>Cf. l10n_be_istrastat_product as example, replace “be” by your
456+
Country Code.</p>
457457
</li>
458458
</ul>
459459
<p><strong>Other functionality added by this module:</strong></p>
@@ -504,6 +504,7 @@ <h2><a class="toc-backref" href="#toc-entry-8">Contributors</a></h2>
504504
<ul class="simple">
505505
<li>João Marques</li>
506506
<li>Víctor Martínez</li>
507+
<li>Juan Carlos Oñate</li>
507508
</ul>
508509
</blockquote>
509510
</li>

intrastat_product/views/intrastat_product_declaration.xml

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

0 commit comments

Comments
 (0)