diff --git a/edi_voxel_account_invoice_oca/__manifest__.py b/edi_voxel_account_invoice_oca/__manifest__.py
index a598c98164..9df26bcab5 100644
--- a/edi_voxel_account_invoice_oca/__manifest__.py
+++ b/edi_voxel_account_invoice_oca/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "Voxel account invoice oca",
"summary": "Sends account invoices to Voxel.",
- "version": "15.0.1.0.2",
+ "version": "17.0.1.0.0",
"development_status": "Production/Stable",
"category": "Accounting & Finance",
"author": "Tecnativa, Odoo Community Association (OCA)",
diff --git a/edi_voxel_account_invoice_oca/migrations/15.0.1.0.0/pre-migration.py b/edi_voxel_account_invoice_oca/migrations/15.0.1.0.0/pre-migration.py
deleted file mode 100644
index 5711f330f7..0000000000
--- a/edi_voxel_account_invoice_oca/migrations/15.0.1.0.0/pre-migration.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 2023 Tecnativa - Ernesto Tejeda
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-
-from openupgradelib import openupgrade
-
-
-@openupgrade.migrate()
-def migrate(env, version):
- mapping_function_record_data = {
- (
- "_get_and_send_voxel_report",
- env.ref("edi_voxel_oca.channel_voxel_export").id,
- ): "job_function_get_and_send_voxel_report",
- (
- "_update_error_status",
- env.ref("edi_voxel_oca.channel_voxel_status").id,
- ): "job_function_update_error_status",
- }
- vals_list = []
- domain = [("model_id", "=", env.ref("account.model_account_move").id)]
- function = env["queue.job.function"].search(domain)
- for record in function:
- key = (record.method, record.channel_id.id)
- if key in mapping_function_record_data:
- vals_list.append(
- {
- "noupdate": True,
- "name": mapping_function_record_data[key],
- "module": "edi_voxel_account_invoice_oca",
- "model": "queue.job.function",
- "res_id": record.id,
- }
- )
- env["ir.model.data"].create(vals_list)
diff --git a/edi_voxel_account_invoice_oca/tests/test_voxel_account_invoice.py b/edi_voxel_account_invoice_oca/tests/test_voxel_account_invoice.py
index 7b2dd01c0e..c64ac05338 100644
--- a/edi_voxel_account_invoice_oca/tests/test_voxel_account_invoice.py
+++ b/edi_voxel_account_invoice_oca/tests/test_voxel_account_invoice.py
@@ -9,7 +9,7 @@
class TestVoxelAccountInvoice(TransactionCase):
@classmethod
def setUpClass(cls):
- super(TestVoxelAccountInvoice, cls).setUpClass()
+ super().setUpClass()
cls.env = cls.env(
context=dict(
cls.env.context,
@@ -62,7 +62,7 @@ def setUpClass(cls):
)
cls.env["product.customerinfo"].create(
{
- "name": partner.id,
+ "partner_id": partner.id,
"product_tmpl_id": product_1.product_tmpl_id.id,
"product_id": product_1.id,
"product_code": "1234567891234",
@@ -74,14 +74,15 @@ def setUpClass(cls):
product_3 = product_obj.create(
{"default_code": "DC_003", "name": "Product 3 (test)"}
)
-
+ tax_group_15 = cls.env["account.tax.group"].create({"name": "Tax 15%"})
+ tax_group_30 = cls.env["account.tax.group"].create({"name": "Tax 30%"})
tax_15 = cls.env["account.tax"].create(
{
"name": "Tax 15%",
"type_tax_use": "sale",
"amount_type": "percent",
"amount": 15,
- "tax_group_id": cls.env.ref("account.tax_group_taxes").id,
+ "tax_group_id": tax_group_15.id,
}
)
tax_30 = cls.env["account.tax"].create(
@@ -90,13 +91,14 @@ def setUpClass(cls):
"type_tax_use": "sale",
"amount_type": "percent",
"amount": 30,
- "tax_group_id": cls.env.ref("account.tax_group_taxes").id,
+ "tax_group_id": tax_group_30.id,
}
)
# Invoice
cls.invoice = cls.env["account.move"].create(
{
"partner_id": partner.id,
+ "partner_shipping_id": False,
"move_type": "out_invoice",
"currency_id": cls.main_company.currency_id.id,
"invoice_date": date(2019, 4, 13),
@@ -109,6 +111,7 @@ def setUpClass(cls):
"product_id": product_1.id,
"quantity": 2,
"price_unit": 750,
+ "tax_ids": False,
"name": "Product 1",
"product_uom_id": cls.env.ref("uom.product_uom_unit").id,
},
@@ -133,6 +136,7 @@ def setUpClass(cls):
"product_id": product_3.id,
"quantity": 0,
"price_unit": 0,
+ "tax_ids": False,
"name": "Product 3",
"product_uom_id": product_3.uom_id.id,
},
@@ -166,6 +170,7 @@ def test_get_report_values(self):
# Get expected data
expected_report_data = self._get_invoice_data()
# Check data
+ self.maxDiff = None
self.assertDictEqual(report_data, expected_report_data)
def _get_invoice_data(self):
diff --git a/edi_voxel_account_invoice_oca/views/account_move_views.xml b/edi_voxel_account_invoice_oca/views/account_move_views.xml
index 924d7f22b9..e4374441c3 100644
--- a/edi_voxel_account_invoice_oca/views/account_move_views.xml
+++ b/edi_voxel_account_invoice_oca/views/account_move_views.xml
@@ -4,28 +4,21 @@
account.move.form.inherit
account.move
-
@@ -33,7 +26,7 @@
@@ -56,7 +49,7 @@
name="voxel_requeue_sudo"
string="Requeue"
class="oe_highlight"
- attrs="{'invisible': [('state', '!=', 'failed')]}"
+ invisible="state != 'failed'"
/>
@@ -81,13 +74,10 @@
-
+
@@ -109,13 +99,12 @@
account.invoice.select.inherit
account.move
-
-
+
res.config.settings.view.form.voxel.invoice
res.config.settings
-
-