odoo-addon-l10n-it-account-stamp 18.0.1.0.0.4__py3-none-any.whl → 18.0.1.1.0.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@ ITA - Imposta di bollo
7
7
  !! This file is generated by oca-gen-addon-readme !!
8
8
  !! changes will be overwritten. !!
9
9
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10
- !! source digest: sha256:3a2471018d0fb7b4e1cbba40630ae81e67aa027440f5c2bcd3e080010dbd773d
10
+ !! source digest: sha256:95d6a6d4374f75f629ed8e315c6d2257e1f886142671f578aaca10e1bc85ff51
11
11
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12
12
 
13
13
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -8,7 +8,7 @@
8
8
 
9
9
  {
10
10
  "name": "ITA - Imposta di bollo",
11
- "version": "18.0.1.0.0",
11
+ "version": "18.0.1.1.0",
12
12
  "category": "Localization/Italy",
13
13
  "summary": "Gestione automatica dell'imposta di bollo",
14
14
  "author": "Ermanno Gnan, Sergio Corato, Enrico Ganzaroli, "
@@ -16,7 +16,7 @@ msgstr ""
16
16
  #. module: l10n_it_account_stamp
17
17
  #: model_terms:ir.ui.view,arch_db:l10n_it_account_stamp.account_move_form_stamp
18
18
  msgid ""
19
- "<span invisible=\"not l10n_it_account_stamp_is_stamp_duty_present\">\n"
19
+ "<span invisible=\"not l10n_it_account_stamp_is_stamp_duty_invoice_line_present\">\n"
20
20
  " Stamp charged to customer\n"
21
21
  " </span>"
22
22
  msgstr ""
@@ -191,8 +191,8 @@ msgid ""
191
191
  msgstr ""
192
192
 
193
193
  #. module: l10n_it_account_stamp
194
- #: model:ir.model.fields,field_description:l10n_it_account_stamp.field_account_bank_statement_line__l10n_it_account_stamp_is_stamp_duty_present
195
- #: model:ir.model.fields,field_description:l10n_it_account_stamp.field_account_move__l10n_it_account_stamp_is_stamp_duty_present
194
+ #: model:ir.model.fields,field_description:l10n_it_account_stamp.field_account_bank_statement_line__l10n_it_account_stamp_is_stamp_duty_invoice_line_present
195
+ #: model:ir.model.fields,field_description:l10n_it_account_stamp.field_account_move__l10n_it_account_stamp_is_stamp_duty_invoice_line_present
196
196
  msgid "Stamp line is present in invoice"
197
197
  msgstr ""
198
198
 
@@ -0,0 +1,17 @@
1
+ # Copyright 2025 Sergio Zanchetta
2
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3
+
4
+ from openupgradelib import openupgrade
5
+
6
+
7
+ @openupgrade.migrate()
8
+ def migrate(env, version):
9
+ openupgrade.logged_query(
10
+ env.cr,
11
+ """
12
+ UPDATE account_move_line aml
13
+ SET
14
+ is_stamp_line = NULL
15
+ WHERE aml.product_id IS NOT NULL AND aml.is_stamp_line = True
16
+ """,
17
+ )
@@ -15,9 +15,9 @@ class AccountMove(models.Model):
15
15
  compute="_compute_l10n_it_account_stamp_is_stamp_duty_applied",
16
16
  store=True,
17
17
  )
18
- l10n_it_account_stamp_is_stamp_duty_present = fields.Boolean(
18
+ l10n_it_account_stamp_is_stamp_duty_invoice_line_present = fields.Boolean(
19
19
  string="Stamp line is present in invoice",
20
- compute="_compute_l10n_it_account_stamp_is_stamp_duty_present",
20
+ compute="_compute_l10n_it_account_stamp_is_stamp_duty_invoice_line_present",
21
21
  )
22
22
  l10n_it_account_stamp_auto_compute_stamp_duty = fields.Boolean(
23
23
  related="company_id.l10n_it_account_stamp_stamp_duty_product_id.l10n_it_account_stamp_auto_compute",
@@ -70,7 +70,7 @@ class AccountMove(models.Model):
70
70
  if invoice.l10n_it_account_stamp_manually_apply_stamp_duty:
71
71
  invoice.l10n_it_account_stamp_is_stamp_duty_applied = True
72
72
 
73
- def add_stamp_duty_line(self):
73
+ def add_stamp_duty_invoice_line(self):
74
74
  for inv in self:
75
75
  if not inv.l10n_it_account_stamp_is_stamp_duty_applied:
76
76
  raise UserError(_("Stamp duty is not applicable"))
@@ -94,7 +94,6 @@ class AccountMove(models.Model):
94
94
  invoice_line_vals = {
95
95
  "move_id": inv.id,
96
96
  "product_id": stamp_product_id.id,
97
- "is_stamp_line": True,
98
97
  "name": stamp_product_id.description_sale,
99
98
  "sequence": 99999,
100
99
  "account_id": stamp_account.id,
@@ -118,10 +117,10 @@ class AccountMove(models.Model):
118
117
  "invoice_line_ids.product_id",
119
118
  "invoice_line_ids.product_id.l10n_it_account_stamp_is_stamp",
120
119
  )
121
- def _compute_l10n_it_account_stamp_is_stamp_duty_present(self):
120
+ def _compute_l10n_it_account_stamp_is_stamp_duty_invoice_line_present(self):
122
121
  for invoice in self:
123
- invoice.l10n_it_account_stamp_is_stamp_duty_present = (
124
- invoice.is_stamp_duty_line_present()
122
+ invoice.l10n_it_account_stamp_is_stamp_duty_invoice_line_present = (
123
+ invoice.is_stamp_duty_product_present()
125
124
  )
126
125
 
127
126
  def is_stamp_duty_product_present(self):
@@ -367,7 +367,7 @@ ul.auto-toc {
367
367
  !! This file is generated by oca-gen-addon-readme !!
368
368
  !! changes will be overwritten. !!
369
369
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370
- !! source digest: sha256:3a2471018d0fb7b4e1cbba40630ae81e67aa027440f5c2bcd3e080010dbd773d
370
+ !! source digest: sha256:95d6a6d4374f75f629ed8e315c6d2257e1f886142671f578aaca10e1bc85ff51
371
371
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372
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/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 image-reference" href="https://github.com/OCA/l10n-italy/tree/18.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 image-reference" href="https://translation.odoo-community.org/projects/l10n-italy-18-0/l10n-italy-18-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 image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-italy&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373
373
  <p><strong>Italiano</strong></p>
@@ -87,7 +87,7 @@ class InvoicingTest(TestAccountInvoiceReport):
87
87
 
88
88
  # Add stamp and check that edited description is kept
89
89
  invoice.button_draft()
90
- invoice.add_stamp_duty_line()
90
+ invoice.add_stamp_duty_invoice_line()
91
91
  self.assertEqual(invoice.invoice_line_ids[0].name, edited_descr)
92
92
 
93
93
  def test_amount_total_changing_currency(self):
@@ -108,28 +108,25 @@ class InvoicingTest(TestAccountInvoiceReport):
108
108
  invoice.action_post()
109
109
  self.assertEqual(total, invoice.amount_total)
110
110
 
111
- def test_stamp_duty_line_button(self):
112
- """Stamp fields show when stamp is added with the button to the invoice."""
113
- # Arrange: Create an invoice eligible for stamp duty but without it
114
- stamp_tax = self.tax_id
115
- invoice = self.init_invoice(
116
- "out_invoice",
117
- taxes=stamp_tax,
118
- amounts=[
119
- 100,
120
- ],
111
+ def test_reset_invoice_to_draft(self):
112
+ """Reset an invoice to draft and check that relative tax stamp accounting lines
113
+ has been deleted."""
114
+ invoice = first(
115
+ self.invoices.filtered(lambda inv: inv.move_type == "out_invoice")
121
116
  )
122
- # pre-condition
123
- self.assertTrue(invoice.l10n_it_account_stamp_is_stamp_duty_applied)
124
- self.assertFalse(invoice.l10n_it_account_stamp_is_stamp_duty_present)
125
117
 
126
- # Act
127
- invoice.add_stamp_duty_line()
118
+ self.assertEqual(len(invoice), 1)
119
+ self.assertEqual(len(invoice.invoice_line_ids), 2)
120
+
121
+ invoice.invoice_line_ids[0].write({"tax_ids": [(6, 0, [self.tax_id.id])]})
128
122
  invoice.action_post()
129
123
 
130
- # Assert
131
- self.assertTrue(invoice.l10n_it_account_stamp_is_stamp_duty_present)
124
+ self.assertEqual(
125
+ len(invoice.line_ids.filtered(lambda line: line.is_stamp_line)), 2
126
+ )
132
127
 
133
- # Resetting to draft removes the stamp
134
128
  invoice.button_draft()
135
- self.assertFalse(invoice.l10n_it_account_stamp_is_stamp_duty_present)
129
+
130
+ self.assertEqual(
131
+ len(invoice.line_ids.filtered(lambda line: line.is_stamp_line)), 0
132
+ )
@@ -34,7 +34,7 @@
34
34
  invisible="l10n_it_account_stamp_auto_compute_stamp_duty"
35
35
  />
36
36
  <field
37
- name="l10n_it_account_stamp_is_stamp_duty_present"
37
+ name="l10n_it_account_stamp_is_stamp_duty_invoice_line_present"
38
38
  invisible="1"
39
39
  />
40
40
  </xpath>
@@ -48,19 +48,23 @@
48
48
  src="/l10n_it_account_stamp/static/description/icon.png"
49
49
  alt="Stamp Duty"
50
50
  />
51
- <span invisible="l10n_it_account_stamp_is_stamp_duty_present">
51
+ <span
52
+ invisible="l10n_it_account_stamp_is_stamp_duty_invoice_line_present"
53
+ >
52
54
  <span invisible="state != 'draft'">
53
55
  <button
54
56
  type="object"
55
57
  string="Charge stamp to customer"
56
- name="add_stamp_duty_line"
58
+ name="add_stamp_duty_invoice_line"
57
59
  />
58
60
  </span>
59
61
  <span invisible="state == 'draft'">
60
62
  Stamp can only be charged to customer when invoice is in draft state
61
63
  </span>
62
64
  </span>
63
- <span invisible="not l10n_it_account_stamp_is_stamp_duty_present">
65
+ <span
66
+ invisible="not l10n_it_account_stamp_is_stamp_duty_invoice_line_present"
67
+ >
64
68
  Stamp charged to customer
65
69
  </span>
66
70
  </div>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-l10n_it_account_stamp
3
- Version: 18.0.1.0.0.4
3
+ Version: 18.0.1.1.0.2
4
4
  Requires-Python: >=3.10
5
5
  Requires-Dist: odoo==18.0.*
6
6
  Summary: Gestione automatica dell'imposta di bollo
@@ -22,7 +22,7 @@ ITA - Imposta di bollo
22
22
  !! This file is generated by oca-gen-addon-readme !!
23
23
  !! changes will be overwritten. !!
24
24
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
25
- !! source digest: sha256:3a2471018d0fb7b4e1cbba40630ae81e67aa027440f5c2bcd3e080010dbd773d
25
+ !! source digest: sha256:95d6a6d4374f75f629ed8e315c6d2257e1f886142671f578aaca10e1bc85ff51
26
26
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
27
27
 
28
28
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -1,14 +1,15 @@
1
- odoo/addons/l10n_it_account_stamp/README.rst,sha256=_ruy66xtHTjVzc3S0bkkgUGwqIP7C6ixpLWT_VnboYs,6115
1
+ odoo/addons/l10n_it_account_stamp/README.rst,sha256=Gf8N8H6PCQnuy54pAP2Z7G3v65SnwvYhVZKaF_GI2ws,6115
2
2
  odoo/addons/l10n_it_account_stamp/__init__.py,sha256=I-UsDedt5Yu5h6YsECfkEkBOa9D7HC0Fh_CU937Zu38,87
3
- odoo/addons/l10n_it_account_stamp/__manifest__.py,sha256=_C0mCaX_f66CFnatYOHRUBjycntDPwpz7QGQUsYkyho,1055
3
+ odoo/addons/l10n_it_account_stamp/__manifest__.py,sha256=3QyHHnpRwe39cofODrrgUH8QVIaNT--UZl6nynKYeFc,1055
4
4
  odoo/addons/l10n_it_account_stamp/data/data.xml,sha256=MhvW0YkctLZiKGBbu_5jqNkRhDlXNG_hXrak9RQHuUo,1094
5
5
  odoo/addons/l10n_it_account_stamp/i18n/it.po,sha256=Xpd4GAvKNJFfxWlJVe_jc5EMSsc3eq7NOO9W9vQbsTg,10236
6
- odoo/addons/l10n_it_account_stamp/i18n/l10n_it_account_stamp.pot,sha256=2nZ4g1vL9zcnWId3IAasWoVdqQoGWVSS2p2cdDQOzak,8303
6
+ odoo/addons/l10n_it_account_stamp/i18n/l10n_it_account_stamp.pot,sha256=tyriQOmmm1wiLhuX17JuVxkTJWuAsfxXOmo2hbZxLeY,8342
7
7
  odoo/addons/l10n_it_account_stamp/migrations/18.0.1.0.0/noupdate_changes.xml,sha256=OpJK3JV1HX1N2FyR2i6hu3hhCRYGJaCrYGQ6TZmWf8E,421
8
8
  odoo/addons/l10n_it_account_stamp/migrations/18.0.1.0.0/post-migration.py,sha256=VpLEZAs1UiETxpuez0vuTSos0aGKSu8i63-fpZdBW4U,425
9
9
  odoo/addons/l10n_it_account_stamp/migrations/18.0.1.0.0/pre-migration.py,sha256=vW7ZEsx0R7omyDgqFr_Wnuc7MuaqKNq9g0sUOsvKWDQ,2287
10
+ odoo/addons/l10n_it_account_stamp/migrations/18.0.1.1.0/post-migration.py,sha256=FYFeo6p50V83n9IX543pRFbBMt8yvI7S4a1rZbyUzAA,425
10
11
  odoo/addons/l10n_it_account_stamp/models/__init__.py,sha256=VsCLpIwj3dfslYgxeQVnrRaP8UYXOcLxzerxw9b9sFM,137
11
- odoo/addons/l10n_it_account_stamp/models/account_move.py,sha256=lAqKAFIg_paQ_PbWPmxXqP01RS5aoBjtVzATKdlnXLc,8609
12
+ odoo/addons/l10n_it_account_stamp/models/account_move.py,sha256=-PeijISVj6uhMw3SvpGy9FuaTNAXHLqk33cI-vNSCSo,8633
12
13
  odoo/addons/l10n_it_account_stamp/models/company.py,sha256=I5MlCiNrEyRpwWX2WE6Ic6DOUCcQSPlFtUIRioZhgRc,742
13
14
  odoo/addons/l10n_it_account_stamp/models/product.py,sha256=HAI9kpd4cZ_HoN1h0HLny4-CrDnJhr1-_yFT7ucrjVw,1339
14
15
  odoo/addons/l10n_it_account_stamp/readme/CONFIGURE.md,sha256=RmmbbhkW6tQMDqd4ivSzFmwtdr3Btz3lmvMvR__wIXI,1905
@@ -17,14 +18,14 @@ odoo/addons/l10n_it_account_stamp/readme/DESCRIPTION.md,sha256=u9p50so5KZHx6D2im
17
18
  odoo/addons/l10n_it_account_stamp/readme/ROADMAP.md,sha256=Vxt80XPvr1M0GN7RYs7FK7_bJq7-4h1xT7rpTRYOx0U,239
18
19
  odoo/addons/l10n_it_account_stamp/readme/USAGE.md,sha256=hwH13xYIEimvkJEjcOzTsj-mQDbvRGMouwuTNJA5c1g,532
19
20
  odoo/addons/l10n_it_account_stamp/static/description/icon.png,sha256=usHO6eloiDtrFBKGx4Bz_wpruwZYZYq6EcMdePNf3k0,13940
20
- odoo/addons/l10n_it_account_stamp/static/description/index.html,sha256=867od_3JusCP9Qb-6mEmlow9T8Of-8uXG_czfqRybK4,17124
21
+ odoo/addons/l10n_it_account_stamp/static/description/index.html,sha256=CRIzOMw_KoH8oginRGFtbyf2badOuOMXDlIUSZejXN0,17124
21
22
  odoo/addons/l10n_it_account_stamp/tests/__init__.py,sha256=WJD_Fmau2vDl9KNayDUsi2kw1PiU9D3OvonXLmiw3_4,43
22
- odoo/addons/l10n_it_account_stamp/tests/test_account_stamp_invoicing.py,sha256=1n6cerfNuoQs25pDFwqSqgWkyA1vxtTlSAtIdPOJ3jo,4907
23
+ odoo/addons/l10n_it_account_stamp/tests/test_account_stamp_invoicing.py,sha256=5UU2ZYMuCEzoDE7MJNOBVkA0r_fMs5zgKdJfEE6cW50,4759
23
24
  odoo/addons/l10n_it_account_stamp/views/account_move_report.xml,sha256=Yfi10juZ7F7EAovQEdemkKybIq5kJUsBCQ-CUHbVyKU,619
24
- odoo/addons/l10n_it_account_stamp/views/account_move_view.xml,sha256=JGqZ7mJfcL3OqIaBu_7EWlKTvRi363aiaVGpMgimEiQ,3338
25
+ odoo/addons/l10n_it_account_stamp/views/account_move_view.xml,sha256=7veIlyguQdO7NOsi3xy9rjfAulRCF-pHBXAStBU7WwY,3475
25
26
  odoo/addons/l10n_it_account_stamp/views/company_view.xml,sha256=pn0LTKJgmuC0K809N9hczp9nAafy5EU7hlsbQ9zzexI,812
26
27
  odoo/addons/l10n_it_account_stamp/views/product_view.xml,sha256=dufET6GNsx25w-HIM9N6b18YC-72exQIngwHef66GUs,2335
27
- odoo_addon_l10n_it_account_stamp-18.0.1.0.0.4.dist-info/METADATA,sha256=9hy2eLBkTHWsuoBk9nKTSHXiuFbHE1mG8gm6r6zFxnc,6688
28
- odoo_addon_l10n_it_account_stamp-18.0.1.0.0.4.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
29
- odoo_addon_l10n_it_account_stamp-18.0.1.0.0.4.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
30
- odoo_addon_l10n_it_account_stamp-18.0.1.0.0.4.dist-info/RECORD,,
28
+ odoo_addon_l10n_it_account_stamp-18.0.1.1.0.2.dist-info/METADATA,sha256=A5kCvQpPpkmKSDYMvfVWzE3jP-o4eE_pBFkIYflHqlQ,6688
29
+ odoo_addon_l10n_it_account_stamp-18.0.1.1.0.2.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
30
+ odoo_addon_l10n_it_account_stamp-18.0.1.1.0.2.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
31
+ odoo_addon_l10n_it_account_stamp-18.0.1.1.0.2.dist-info/RECORD,,