Skip to content

Commit 4480dcc

Browse files
author
Reanova Migration
committed
[MIG] base_import_async: Migration to 19.0
- bump version 18.0.1.0.0 -> 19.0.1.0.0 - installable False -> True - remove @api.returns("ir.attachment") decorator on _create_csv_attachment (decorator no longer supported in V19; the method already returns an ir.attachment recordset, so the decorator was redundant) - remove module from .pre-commit-config.yaml NOT INSTALLABLE list - add odoo-addon-base_import_async==19.0.* to setup/_metapackage dependencies Tested on a V19 install with a 35k-row partner CSV: import is correctly queued as a queue.job and processed in background. The ir.attachment returned by _create_csv_attachment is properly linked to the queue job (res_model="queue.job"). Note: queue_job_cron was dropped from this PR because its test_queue_job_cron_callback test fails on V19 due to an internal cr.commit() in ir.cron._callback (V19 forbids commit/rollback inside TransactionCase tests). That migration needs a separate PR with a test refactor (savepoint-based or testing-bus-mock based).
1 parent ebb87ea commit 4480dcc

4 files changed

Lines changed: 3 additions & 4 deletions

File tree

.pre-commit-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
exclude: |
22
(?x)
33
# NOT INSTALLABLE ADDONS
4-
^base_import_async/|
54
^queue_job_batch/|
65
^queue_job_cron/|
76
^queue_job_cron_jobrunner/|

base_import_async/__manifest__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{
66
"name": "Asynchronous Import",
77
"summary": "Import CSV files in the background",
8-
"version": "18.0.1.0.0",
8+
"version": "19.0.1.0.0",
99
"author": "Akretion, ACSONE SA/NV, Odoo Community Association (OCA)",
1010
"license": "AGPL-3",
1111
"website": "https://github.com/OCA/queue",
@@ -20,6 +20,6 @@
2020
"base_import_async/static/src/xml/import_data_sidepanel.xml",
2121
],
2222
},
23-
"installable": False,
23+
"installable": True,
2424
"development_status": "Production/Stable",
2525
}

base_import_async/models/base_import_import.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ def _link_attachment_to_job(self, delayed_job, attachment):
7878
)
7979
attachment.write({"res_model": "queue.job", "res_id": queue_job.id})
8080

81-
@api.returns("ir.attachment")
8281
def _create_csv_attachment(self, fields, data, options, file_name):
8382
# write csv
8483
f = StringIO()

setup/_metapackage/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name = "odoo-addons-oca-queue"
33
version = "19.0.20260104.0"
44
dependencies = [
5+
"odoo-addon-base_import_async==19.0.*",
56
"odoo-addon-queue_job==19.0.*",
67
"odoo-addon-test_queue_job==19.0.*",
78
]

0 commit comments

Comments
 (0)