Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ exclude: |
(?x)
# NOT INSTALLABLE ADDONS
^base_export_async/|
^base_import_async/|
^queue_job_subscribe/|
^test_base_import_async/|
# END NOT INSTALLABLE ADDONS
# Files and folders generated by bots, to avoid loops
^setup/|/static/description/index\.html$|
Expand Down
4 changes: 2 additions & 2 deletions base_import_async/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
{
"name": "Asynchronous Import",
"summary": "Import CSV files in the background",
"version": "13.0.2.0.0",
"version": "14.0.1.0.0",
"author": "Akretion, ACSONE SA/NV, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/queue",
"category": "Generic Modules",
"depends": ["base_import", "queue_job"],
"data": ["data/queue_job_function_data.xml", "views/base_import_async.xml"],
"qweb": ["static/src/xml/import.xml"],
"installable": False,
"installable": True,
"development_status": "Production/Stable",
}
9 changes: 5 additions & 4 deletions base_import_async/static/src/js/import.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ odoo.define("base_import_async.import", function(require) {

onimported: function() {
if (this.$("input.oe_import_queue").prop("checked")) {
this.do_notify(
_t("Your request is being processed"),
_t("You can check the status of this job in menu 'Queue / Jobs'.")
);
this.displayNotification({
type: 'warning',
title: _t("Your request is being processed"),
message: _t("You can check the status of this job in menu 'Queue / Jobs'."),
});
this.exit();
} else {
this._super.apply(this, arguments);
Expand Down
1 change: 1 addition & 0 deletions setup/base_import_async/odoo/addons/base_import_async
6 changes: 6 additions & 0 deletions setup/base_import_async/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
6 changes: 6 additions & 0 deletions setup/test_base_import_async/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
4 changes: 2 additions & 2 deletions test_base_import_async/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{
"name": "Test suite for base_import_async",
"version": "13.0.1.0.0",
"version": "14.0.1.0.0",
"author": "ACSONE SA/NV, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/queue",
Expand All @@ -15,6 +15,6 @@
""",
"depends": ["base_import_async", "account"],
"data": [],
"installable": False,
"installable": True,
"development_status": "Production/Stable",
}
20 changes: 10 additions & 10 deletions test_base_import_async/tests/test_base_import_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def test_async_import(self):
self.assertEqual(len(split_job), 1)
# job names are important
self.assertEqual(
split_job.name, "Import Journal Entries from file account.move.csv"
split_job.name, "Import Journal Entry from file account.move.csv"
)
# perform job
Job.load(self.env, split_job.uuid).perform()
Expand All @@ -114,7 +114,7 @@ def test_async_import(self):
self.assertEqual(len(load_job), 1)
self.assertEqual(
load_job.name,
"Import Journal Entries from file account.move.csv - " "#0 - lines 2 to 10",
"Import Journal Entry from file account.move.csv - " "#0 - lines 2 to 10",
)
# perform job
Job.load(self.env, load_job.uuid).perform()
Expand All @@ -134,11 +134,11 @@ def test_async_import_small_misaligned_chunks(self):
self.assertEqual(len(load_jobs), 2)
self.assertEqual(
load_jobs[0].name,
"Import Journal Entries from file account.move.csv - " "#0 - lines 2 to 7",
"Import Journal Entry from file account.move.csv - " "#0 - lines 2 to 7",
)
self.assertEqual(
load_jobs[1].name,
"Import Journal Entries from file account.move.csv - " "#1 - lines 8 to 10",
"Import Journal Entry from file account.move.csv - " "#1 - lines 8 to 10",
)
# perform job
Job.load(self.env, load_jobs[0].uuid).perform()
Expand All @@ -159,15 +159,15 @@ def test_async_import_smaller_misaligned_chunks(self):
self.assertEqual(len(load_jobs), 3)
self.assertEqual(
load_jobs[0].name,
"Import Journal Entries from file account.move.csv - " "#0 - lines 2 to 4",
"Import Journal Entry from file account.move.csv - " "#0 - lines 2 to 4",
)
self.assertEqual(
load_jobs[1].name,
"Import Journal Entries from file account.move.csv - " "#1 - lines 5 to 7",
"Import Journal Entry from file account.move.csv - " "#1 - lines 5 to 7",
)
self.assertEqual(
load_jobs[2].name,
"Import Journal Entries from file account.move.csv - " "#2 - lines 8 to 10",
"Import Journal Entry from file account.move.csv - " "#2 - lines 8 to 10",
)
# perform job
Job.load(self.env, load_jobs[0].uuid).perform()
Expand All @@ -190,15 +190,15 @@ def test_async_import_smaller_aligned_chunks(self):
self.assertEqual(len(load_jobs), 3)
self.assertEqual(
load_jobs[0].name,
"Import Journal Entries from file account.move.csv - " "#0 - lines 2 to 4",
"Import Journal Entry from file account.move.csv - " "#0 - lines 2 to 4",
)
self.assertEqual(
load_jobs[1].name,
"Import Journal Entries from file account.move.csv - " "#1 - lines 5 to 7",
"Import Journal Entry from file account.move.csv - " "#1 - lines 5 to 7",
)
self.assertEqual(
load_jobs[2].name,
"Import Journal Entries from file account.move.csv - " "#2 - lines 8 to 10",
"Import Journal Entry from file account.move.csv - " "#2 - lines 8 to 10",
)
# perform job
Job.load(self.env, load_jobs[0].uuid).perform()
Expand Down