diff --git a/l10n_it_account_stamp/__manifest__.py b/l10n_it_account_stamp/__manifest__.py index 1c6d810f7ca8..c16f30f908ea 100644 --- a/l10n_it_account_stamp/__manifest__.py +++ b/l10n_it_account_stamp/__manifest__.py @@ -8,7 +8,7 @@ { "name": "ITA - Imposta di bollo", - "version": "14.0.1.1.0", + "version": "16.0.1.0.0", "category": "Localization/Italy", "summary": "Gestione automatica dell'imposta di bollo", "author": "Ermanno Gnan, Sergio Corato, Enrico Ganzaroli, " diff --git a/l10n_it_account_stamp/data/data.xml b/l10n_it_account_stamp/data/data.xml index 850d9b7fe8fe..e41f449416c7 100644 --- a/l10n_it_account_stamp/data/data.xml +++ b/l10n_it_account_stamp/data/data.xml @@ -1,30 +1,28 @@ - - + - - Tax Stamp 2 euro - service - - - Stamp duty payment under the terms of Art. 6, Subsection 2 of MEF Decree June - 17, 2014 - - - - - - - + + Tax Stamp 2 euro + service + + + Stamp duty payment under the terms of Art. 6, Subsection 2 of MEF Decree June + 17, 2014 + + + + + + + - - - + + + - diff --git a/l10n_it_account_stamp/i18n/it.po b/l10n_it_account_stamp/i18n/it.po index 9b0140f9c53b..50edd036eb57 100644 --- a/l10n_it_account_stamp/i18n/it.po +++ b/l10n_it_account_stamp/i18n/it.po @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-12-24 15:03+0000\n" "PO-Revision-Date: 2021-05-06 21:47+0000\n" diff --git a/l10n_it_account_stamp/migrations/13.0.1.0.0/post-migrate.py b/l10n_it_account_stamp/migrations/13.0.1.0.0/post-migrate.py deleted file mode 100644 index 87a5101272f8..000000000000 --- a/l10n_it_account_stamp/migrations/13.0.1.0.0/post-migrate.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2022 Alex Comba - Agile Business Group -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -from openupgradelib import openupgrade - - -@openupgrade.migrate() -def migrate(env, version): - openupgrade.logged_query( - env.cr, - """ - update account_move - set - tax_stamp = inv.tax_stamp - from account_invoice inv - where - account_move.id = inv.move_id; - """, - ) diff --git a/l10n_it_account_stamp/models/account_move.py b/l10n_it_account_stamp/models/account_move.py index d62574db60b7..d161d09ef374 100644 --- a/l10n_it_account_stamp/models/account_move.py +++ b/l10n_it_account_stamp/models/account_move.py @@ -7,9 +7,7 @@ class AccountMove(models.Model): _inherit = "account.move" - tax_stamp = fields.Boolean( - "Tax Stamp", readonly=False, compute="_compute_tax_stamp", store=True - ) + tax_stamp = fields.Boolean(readonly=False, compute="_compute_tax_stamp", store=True) auto_compute_stamp = fields.Boolean( related="company_id.tax_stamp_product_id.auto_compute" ) @@ -81,9 +79,9 @@ def add_tax_stamp_line(self): "account_id": stamp_account.id, "price_unit": stamp_product_id.list_price, "quantity": 1, + "display_type": "product", "product_uom_id": stamp_product_id.uom_id.id, "tax_ids": [(6, 0, stamp_product_id.taxes_id.ids)], - "analytic_account_id": None, } inv.write({"invoice_line_ids": [(0, 0, invoice_line_vals)]}) @@ -125,7 +123,7 @@ def _build_tax_stamp_lines(self, product): "date": self.invoice_date, "debit": 0, "credit": product.list_price, - "exclude_from_invoice_tab": True, + "display_type": "cogs", "currency_id": self.currency_id.id, } if self.move_type == "out_refund": @@ -141,7 +139,7 @@ def _build_tax_stamp_lines(self, product): "date": self.invoice_date, "debit": product.list_price, "credit": 0, - "exclude_from_invoice_tab": True, + "display_type": "cogs", "currency_id": self.currency_id.id, } if self.move_type == "out_refund": diff --git a/l10n_it_account_stamp/tests/test_account_stamp_invoicing.py b/l10n_it_account_stamp/tests/test_account_stamp_invoicing.py index 1f604ed6ab34..87bfad2f25a9 100644 --- a/l10n_it_account_stamp/tests/test_account_stamp_invoicing.py +++ b/l10n_it_account_stamp/tests/test_account_stamp_invoicing.py @@ -19,9 +19,9 @@ def setUp(self): [ ("company_id", "=", self.env.company.id), ( - "user_type_id", + "account_type", "=", - self.env.ref("account.data_account_type_revenue").id, + "income", ), ], limit=1, @@ -30,9 +30,9 @@ def setUp(self): [ ("company_id", "=", self.env.company.id), ( - "user_type_id", + "account_type", "=", - self.env.ref("account.data_account_type_expenses").id, + "expense", ), ], limit=1, diff --git a/l10n_it_account_stamp/views/account_move_view.xml b/l10n_it_account_stamp/views/account_move_view.xml index 8966cea3d895..7fa611d868fa 100644 --- a/l10n_it_account_stamp/views/account_move_view.xml +++ b/l10n_it_account_stamp/views/account_move_view.xml @@ -1,57 +1,52 @@ - - - - account.move.form.stamp - account.move - - - - - - - CadetBlue:is_stamp_line==True; - - - - - - - - Tax stamp -