diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 464ea5f5d8..f4570976a2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,6 @@ exclude: | (?x) # NOT INSTALLABLE ADDONS ^base_export_async/| - ^base_import_async/| ^test_base_import_async/| # END NOT INSTALLABLE ADDONS # Files and folders generated by bots, to avoid loops diff --git a/base_import_async/__manifest__.py b/base_import_async/__manifest__.py index 205960ff84..3545567b25 100644 --- a/base_import_async/__manifest__.py +++ b/base_import_async/__manifest__.py @@ -5,14 +5,23 @@ { "name": "Asynchronous Import", "summary": "Import CSV files in the background", - "version": "14.0.1.0.1", + "version": "15.0.1.0.1", "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, + "data": [ + "data/queue_job_function_data.xml", + ], + "assets": { + "web.assets_qweb": [ + "base_import_async/static/src/xml/import.xml", + ], + "web.assets_backend": [ + "/base_import_async/static/src/js/import.js", + ], + }, + "installable": True, "development_status": "Production/Stable", } diff --git a/base_import_async/i18n/tr.po b/base_import_async/i18n/tr.po new file mode 100644 index 0000000000..f678a5d95e --- /dev/null +++ b/base_import_async/i18n/tr.po @@ -0,0 +1,80 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_import_async +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0-20221029\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-24 07:21+0000\n" +"PO-Revision-Date: 2022-11-24 10:25+0300\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Language: tr_TR\n" +"X-Generator: Poedit 2.4.2\n" + +#. module: base_import_async +#: code:addons/base_import_async/models/queue_job.py:0 +#, python-format +msgid "Attachment" +msgstr "Ek" + +#. module: base_import_async +#: model:ir.model,name:base_import_async.model_base_import_import +msgid "Base Import" +msgstr "İçe aktarım" + +#. module: base_import_async +#: code:addons/base_import_async/models/base_import_import.py:0 +#, python-format +msgid "Import %s from file %s" +msgstr "%s dosyasından %s içe aktar" + +#. module: base_import_async +#: code:addons/base_import_async/models/base_import_import.py:0 +#, python-format +msgid "Import %s from file %s - #%s - lines %s to %s" +msgstr "%s dosyasından %s - #%s - %s - %s satırlarını içe aktar" + +#. module: base_import_async +#. openerp-web +#: code:addons/base_import_async/static/src/xml/import.xml:0 +#, python-format +msgid "Import in the background" +msgstr "Arka planda içe aktarım" + +#. module: base_import_async +#: model:ir.model,name:base_import_async.model_queue_job +msgid "Queue Job" +msgstr "İş Kuyruğu" + +#. module: base_import_async +#. openerp-web +#: code:addons/base_import_async/static/src/xml/import.xml:0 +#, python-format +msgid "" +"When checked, the import will be executed as a background job, after " +"splitting your file in small chunks that will be processed independently. " +"Use this to import very large files." +msgstr "" +"İşaretlendiğinde, içe aktarım işlemi, dosyanızı bağımsız olarak işlenecek " +"küçük parçalara ayırdıktan sonra bir arka plan işi olarak yürütülür. Çok " +"büyük dosyaları içe aktarmak için bunu kullanın." + +#. module: base_import_async +#. openerp-web +#: code:addons/base_import_async/static/src/js/import.js:0 +#, python-format +msgid "You can check the status of this job in menu 'Queue / Jobs'." +msgstr "Bu işin durumunu 'Kuyruk / İşler' menüsünden kontrol edebilirsiniz." + +#. module: base_import_async +#. openerp-web +#: code:addons/base_import_async/static/src/js/import.js:0 +#, python-format +msgid "Your request is being processed" +msgstr "İsteğiniz işleniyor" diff --git a/base_import_async/models/base_import_import.py b/base_import_async/models/base_import_import.py index de08c5efb1..b504957222 100644 --- a/base_import_async/models/base_import_import.py +++ b/base_import_async/models/base_import_import.py @@ -32,10 +32,10 @@ class BaseImportImport(models.TransientModel): _inherit = "base_import.import" - def do(self, fields, columns, options, dryrun=False): + def execute_import(self, fields, columns, options, dryrun=False): if dryrun or not options.get(OPT_USE_QUEUE): # normal import - return super().do(fields, columns, options, dryrun=dryrun) + return super().execute_import(fields, columns, options, dryrun=dryrun) # asynchronous import try: @@ -130,7 +130,7 @@ def _split_file( options, file_name="file.csv", ): - """ Split a CSV attachment in smaller import jobs """ + """Split a CSV attachment in smaller import jobs""" model_obj = self.env[model_name] fields, data = self._read_csv_attachment(attachment, options) padding = len(str(len(data))) diff --git a/base_import_async/models/queue_job.py b/base_import_async/models/queue_job.py index fd1faec28e..e3594f3568 100644 --- a/base_import_async/models/queue_job.py +++ b/base_import_async/models/queue_job.py @@ -5,7 +5,7 @@ class QueueJob(models.Model): - """ Job status and result """ + """Job status and result""" _inherit = "queue.job" diff --git a/base_import_async/static/src/xml/import.xml b/base_import_async/static/src/xml/import.xml index d401157a14..5ad14fc5da 100644 --- a/base_import_async/static/src/xml/import.xml +++ b/base_import_async/static/src/xml/import.xml @@ -1,6 +1,6 @@ - +
- -