Skip to content

Commit 626443c

Browse files
committed
[MIG] l10n_it_account_stamp: Migration to 16.0
1 parent 170a057 commit 626443c

12 files changed

Lines changed: 189 additions & 227 deletions

File tree

l10n_it_account_stamp/README.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ ITA - Imposta di bollo
1414
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
1515
:alt: License: LGPL-3
1616
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github
17-
:target: https://github.com/OCA/l10n-italy/tree/14.0/l10n_it_account_stamp
17+
:target: https://github.com/OCA/l10n-italy/tree/16.0/l10n_it_account_stamp
1818
:alt: OCA/l10n-italy
1919
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
20-
:target: https://translation.odoo-community.org/projects/l10n-italy-14-0/l10n-italy-14-0-l10n_it_account_stamp
20+
:target: https://translation.odoo-community.org/projects/l10n-italy-16-0/l10n-italy-16-0-l10n_it_account_stamp
2121
:alt: Translate me on Weblate
2222
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
23-
:target: https://runbot.odoo-community.org/runbot/122/14.0
23+
:target: https://runbot.odoo-community.org/runbot/122/16.0
2424
:alt: Try me on Runbot
2525

2626
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -45,9 +45,9 @@ Configuration
4545

4646
Per modificare le impostazioni sul prodotto "Imposta di bollo 2 euro" è necessario abilitare le funzioni complete per la contabilità:
4747

48-
1. Impostazioni -> Utenti e aziende -> Utenti
49-
2. Selezionare l'utente per il quale si vuole abilitare la funzionalità
50-
3. Abilitare l'opzione "Mostrare funzionalità contabili complete"
48+
1. Impostazioni -> Utenti e aziende -> Gruppi
49+
2. Cercare il gruppo "Mostrare funzionalità contabili complete" e selezionarlo
50+
3. Nel tab "Utenti" aggiungere l'utente e salvare
5151

5252

5353
Modalità automatica:
@@ -68,9 +68,9 @@ Impostare i conti di ricavo/costo nella scheda "Contabilità", generalmente rica
6868

6969
In order to change Tax Stamp 2 euro product settings, enable full accounting features:
7070

71-
1. Settings -> Users & Companies -> Users
72-
2. Click on the user you want to enable feature
73-
3. Enable 'Show Full Accounting Features' option
71+
1. Settings -> Users & Companies -> Groups
72+
2. Search "Show Full Accounting Features" group and select it
73+
3. In "Users" Tab, add user and save
7474

7575
Automatic mode:
7676

@@ -107,7 +107,7 @@ Bug Tracker
107107
Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-italy/issues>`_.
108108
In case of trouble, please check there if your issue has already been reported.
109109
If you spotted it first, help us smashing it by providing a detailed and welcomed
110-
`feedback <https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_account_stamp%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
110+
`feedback <https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_account_stamp%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
111111

112112
Do not contact contributors directly about support or help with technical issues.
113113

@@ -146,6 +146,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
146146
mission is to support the collaborative development of Odoo features and
147147
promote its widespread use.
148148

149-
This module is part of the `OCA/l10n-italy <https://github.com/OCA/l10n-italy/tree/14.0/l10n_it_account_stamp>`_ project on GitHub.
149+
This module is part of the `OCA/l10n-italy <https://github.com/OCA/l10n-italy/tree/16.0/l10n_it_account_stamp>`_ project on GitHub.
150150

151151
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

l10n_it_account_stamp/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
{
1010
"name": "ITA - Imposta di bollo",
11-
"version": "14.0.1.1.0",
11+
"version": "16.0.1.0.0",
1212
"category": "Localization/Italy",
1313
"summary": "Gestione automatica dell'imposta di bollo",
1414
"author": "Ermanno Gnan, Sergio Corato, Enrico Ganzaroli, "
Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,28 @@
11
<?xml version="1.0" encoding="utf-8" ?>
2-
<odoo>
3-
<data noupdate="1">
2+
<odoo noupdate="1">
43

5-
<record id="l10n_it_account_stamp_2_euro" model="product.product">
6-
<field name="name">Tax Stamp 2 euro</field>
7-
<field name="type">service</field>
8-
<field name="list_price" eval="2.0" />
9-
<field name="standard_price" eval="2.0" />
10-
<field
11-
name="description_sale"
12-
>Stamp duty payment under the terms of Art. 6, Subsection 2 of MEF Decree June
13-
17, 2014
14-
</field>
15-
<field name="is_stamp" eval="True" />
16-
<field name="auto_compute" eval="True" />
17-
<field name="stamp_apply_min_total_base" eval="77.47" />
18-
<field name="taxes_id" eval="[(6, 0, [])]" />
19-
<field name="supplier_taxes_id" eval="[(6, 0, [])]" />
20-
</record>
4+
<record id="l10n_it_account_stamp_2_euro" model="product.product">
5+
<field name="name">Tax Stamp 2 euro</field>
6+
<field name="type">service</field>
7+
<field name="list_price" eval="2.0" />
8+
<field name="standard_price" eval="2.0" />
9+
<field
10+
name="description_sale"
11+
>Stamp duty payment under the terms of Art. 6, Subsection 2 of MEF Decree June
12+
17, 2014
13+
</field>
14+
<field name="is_stamp" eval="True" />
15+
<field name="auto_compute" eval="True" />
16+
<field name="stamp_apply_min_total_base" eval="77.47" />
17+
<field name="taxes_id" eval="[(6, 0, [])]" />
18+
<field name="supplier_taxes_id" eval="[(6, 0, [])]" />
19+
</record>
2120

22-
<record id="base.main_company" model="res.company">
23-
<field
24-
name="tax_stamp_product_id"
25-
ref="l10n_it_account_stamp.l10n_it_account_stamp_2_euro"
26-
/>
27-
</record>
21+
<record id="base.main_company" model="res.company">
22+
<field
23+
name="tax_stamp_product_id"
24+
ref="l10n_it_account_stamp.l10n_it_account_stamp_2_euro"
25+
/>
26+
</record>
2827

29-
</data>
3028
</odoo>

l10n_it_account_stamp/i18n/it.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
msgid ""
66
msgstr ""
7-
"Project-Id-Version: Odoo Server 12.0\n"
7+
"Project-Id-Version: Odoo Server 16.0\n"
88
"Report-Msgid-Bugs-To: \n"
99
"POT-Creation-Date: 2018-12-24 15:03+0000\n"
1010
"PO-Revision-Date: 2021-05-06 21:47+0000\n"

l10n_it_account_stamp/migrations/13.0.1.0.0/post-migrate.py

Lines changed: 0 additions & 19 deletions
This file was deleted.

l10n_it_account_stamp/models/account_move.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
class AccountMove(models.Model):
88
_inherit = "account.move"
99

10-
tax_stamp = fields.Boolean(
11-
"Tax Stamp", readonly=False, compute="_compute_tax_stamp", store=True
12-
)
10+
tax_stamp = fields.Boolean(readonly=False, compute="_compute_tax_stamp", store=True)
1311
auto_compute_stamp = fields.Boolean(
1412
related="company_id.tax_stamp_product_id.auto_compute"
1513
)
@@ -81,18 +79,12 @@ def add_tax_stamp_line(self):
8179
"account_id": stamp_account.id,
8280
"price_unit": stamp_product_id.list_price,
8381
"quantity": 1,
82+
"display_type": "product",
8483
"product_uom_id": stamp_product_id.uom_id.id,
8584
"tax_ids": [(6, 0, stamp_product_id.taxes_id.ids)],
86-
"analytic_account_id": None,
8785
}
8886
inv.write({"invoice_line_ids": [(0, 0, invoice_line_vals)]})
8987

90-
def _move_autocomplete_invoice_lines_values(self):
91-
# Load line names in cache,
92-
# otherwise they are reset to the default value
93-
self.line_ids.mapped("name")
94-
return super()._move_autocomplete_invoice_lines_values()
95-
9688
def is_tax_stamp_line_present(self):
9789
for line in self.line_ids:
9890
if line.is_stamp_line:
@@ -125,7 +117,7 @@ def _build_tax_stamp_lines(self, product):
125117
"date": self.invoice_date,
126118
"debit": 0,
127119
"credit": product.list_price,
128-
"exclude_from_invoice_tab": True,
120+
"display_type": "cogs",
129121
"currency_id": self.currency_id.id,
130122
}
131123
if self.move_type == "out_refund":
@@ -141,7 +133,7 @@ def _build_tax_stamp_lines(self, product):
141133
"date": self.invoice_date,
142134
"debit": product.list_price,
143135
"credit": 0,
144-
"exclude_from_invoice_tab": True,
136+
"display_type": "cogs",
145137
"currency_id": self.currency_id.id,
146138
}
147139
if self.move_type == "out_refund":

l10n_it_account_stamp/readme/CONFIGURE.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
Per modificare le impostazioni sul prodotto "Imposta di bollo 2 euro" è necessario abilitare le funzioni complete per la contabilità:
44

5-
1. Impostazioni -> Utenti e aziende -> Utenti
6-
2. Selezionare l'utente per il quale si vuole abilitare la funzionalità
7-
3. Abilitare l'opzione "Mostrare funzionalità contabili complete"
5+
1. Impostazioni -> Utenti e aziende -> Gruppi
6+
2. Cercare il gruppo "Mostrare funzionalità contabili complete" e selezionarlo
7+
3. Nel tab "Utenti" aggiungere l'utente e salvare
88

99

1010
Modalità automatica:
@@ -25,9 +25,9 @@ Impostare i conti di ricavo/costo nella scheda "Contabilità", generalmente rica
2525

2626
In order to change Tax Stamp 2 euro product settings, enable full accounting features:
2727

28-
1. Settings -> Users & Companies -> Users
29-
2. Click on the user you want to enable feature
30-
3. Enable 'Show Full Accounting Features' option
28+
1. Settings -> Users & Companies -> Groups
29+
2. Search "Show Full Accounting Features" group and select it
30+
3. In "Users" Tab, add user and save
3131

3232
Automatic mode:
3333

l10n_it_account_stamp/static/description/index.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
44
<head>
55
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6-
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
6+
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
77
<title>ITA - Imposta di bollo</title>
88
<style type="text/css">
99

@@ -367,7 +367,7 @@ <h1 class="title">ITA - Imposta di bollo</h1>
367367
!! This file is generated by oca-gen-addon-readme !!
368368
!! changes will be overwritten. !!
369369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
370-
<p><a class="reference external" 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" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/l10n-italy/tree/14.0/l10n_it_account_stamp"><img alt="OCA/l10n-italy" src="https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/l10n-italy-14-0/l10n-italy-14-0-l10n_it_account_stamp"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/122/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
370+
<p><a class="reference external" 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" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/l10n-italy/tree/16.0/l10n_it_account_stamp"><img alt="OCA/l10n-italy" src="https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/l10n-italy-16-0/l10n-italy-16-0-l10n_it_account_stamp"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/122/16.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
371371
<p><strong>Italiano</strong></p>
372372
<p>Questo modulo aggiunge il supporto all’imposta di bollo italiana nelle fatture e nelle ricevute.</p>
373373
<p><strong>English</strong></p>
@@ -391,9 +391,9 @@ <h1><a class="toc-backref" href="#id1">Configuration</a></h1>
391391
<p><strong>Italiano</strong></p>
392392
<p>Per modificare le impostazioni sul prodotto “Imposta di bollo 2 euro” è necessario abilitare le funzioni complete per la contabilità:</p>
393393
<ol class="arabic simple">
394-
<li>Impostazioni -&gt; Utenti e aziende -&gt; Utenti</li>
395-
<li>Selezionare l’utente per il quale si vuole abilitare la funzionalità</li>
396-
<li>Abilitare l’opzione “Mostrare funzionalità contabili complete”</li>
394+
<li>Impostazioni -&gt; Utenti e aziende -&gt; Gruppi</li>
395+
<li>Cercare il gruppo “Mostrare funzionalità contabili complete” e selezionarlo</li>
396+
<li>Nel tab “Utenti” aggiungere l’utente e salvare</li>
397397
</ol>
398398
<p>Modalità automatica:</p>
399399
<ul class="simple">
@@ -409,9 +409,9 @@ <h1><a class="toc-backref" href="#id1">Configuration</a></h1>
409409
<p><strong>English</strong></p>
410410
<p>In order to change Tax Stamp 2 euro product settings, enable full accounting features:</p>
411411
<ol class="arabic simple">
412-
<li>Settings -&gt; Users &amp; Companies -&gt; Users</li>
413-
<li>Click on the user you want to enable feature</li>
414-
<li>Enable ‘Show Full Accounting Features’ option</li>
412+
<li>Settings -&gt; Users &amp; Companies -&gt; Groups</li>
413+
<li>Search “Show Full Accounting Features” group and select it</li>
414+
<li>In “Users” Tab, add user and save</li>
415415
</ol>
416416
<p>Automatic mode:</p>
417417
<ul class="simple">
@@ -439,7 +439,7 @@ <h1><a class="toc-backref" href="#id3">Bug Tracker</a></h1>
439439
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-italy/issues">GitHub Issues</a>.
440440
In case of trouble, please check there if your issue has already been reported.
441441
If you spotted it first, help us smashing it by providing a detailed and welcomed
442-
<a class="reference external" href="https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_account_stamp%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
442+
<a class="reference external" href="https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_account_stamp%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
443443
<p>Do not contact contributors directly about support or help with technical issues.</p>
444444
</div>
445445
<div class="section" id="credits">
@@ -472,7 +472,7 @@ <h2><a class="toc-backref" href="#id7">Maintainers</a></h2>
472472
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
473473
mission is to support the collaborative development of Odoo features and
474474
promote its widespread use.</p>
475-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-italy/tree/14.0/l10n_it_account_stamp">OCA/l10n-italy</a> project on GitHub.</p>
475+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-italy/tree/16.0/l10n_it_account_stamp">OCA/l10n-italy</a> project on GitHub.</p>
476476
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
477477
</div>
478478
</div>

l10n_it_account_stamp/tests/test_account_stamp_invoicing.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ def setUp(self):
1919
[
2020
("company_id", "=", self.env.company.id),
2121
(
22-
"user_type_id",
22+
"account_type",
2323
"=",
24-
self.env.ref("account.data_account_type_revenue").id,
24+
"income",
2525
),
2626
],
2727
limit=1,
@@ -30,9 +30,9 @@ def setUp(self):
3030
[
3131
("company_id", "=", self.env.company.id),
3232
(
33-
"user_type_id",
33+
"account_type",
3434
"=",
35-
self.env.ref("account.data_account_type_expenses").id,
35+
"expense",
3636
),
3737
],
3838
limit=1,

0 commit comments

Comments
 (0)