diff --git a/base_export_async/README.rst b/base_export_async/README.rst new file mode 100644 index 0000000000..a6de890a21 --- /dev/null +++ b/base_export_async/README.rst @@ -0,0 +1,87 @@ +================= +Base Export Async +================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:85ce335207ce3505a7676a8a78743155f9f8c01d1c6f777fe2308c5e77f00e5a + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fqueue-lightgray.png?logo=github + :target: https://github.com/OCA/queue/tree/18.0/base_export_async + :alt: OCA/queue +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/queue-18-0/queue-18-0-base_export_async + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/queue&target_branch=18.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Standard Export can be delayed in asynchronous jobs executed in the +background and then send by email to the user. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +The user is presented with a new checkbox "Asynchronous export" in the +export screen. When selected, the export is delayed in a background job. + +The .csv or .xls file generated by the export will be sent by email to +the user who execute the export. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* ACSONE SA/NV + +Contributors +------------ + +- Arnaud Pineux (ACSONE SA/NV) authored the initial prototype. +- Guewen Baconnier (Camptocamp) + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/queue `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/base_export_async/__init__.py b/base_export_async/__init__.py new file mode 100644 index 0000000000..8e4b46541f --- /dev/null +++ b/base_export_async/__init__.py @@ -0,0 +1,4 @@ +# Copyright 2019 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import models diff --git a/base_export_async/__manifest__.py b/base_export_async/__manifest__.py new file mode 100644 index 0000000000..a394e9e398 --- /dev/null +++ b/base_export_async/__manifest__.py @@ -0,0 +1,28 @@ +# Copyright 2019 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Base Export Async", + "summary": "Asynchronous export with job queue", + "version": "18.0.1.0.0", + "license": "AGPL-3", + "author": "ACSONE SA/NV, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/queue", + "depends": ["web", "queue_job"], + "data": [ + "security/ir.model.access.csv", + "security/ir_rule.xml", + "data/config_parameter.xml", + "data/cron.xml", + "data/mail_template.xml", + ], + "demo": [], + "assets": { + "web.assets_backend": [ + "base_export_async/static/src/xml/base.xml", + "base_export_async/static/src/js/list_controller.esm.js", + "base_export_async/static/src/js/data_export.esm.js", + ], + }, + "installable": True, +} diff --git a/base_export_async/data/config_parameter.xml b/base_export_async/data/config_parameter.xml new file mode 100644 index 0000000000..38ff75fd6e --- /dev/null +++ b/base_export_async/data/config_parameter.xml @@ -0,0 +1,7 @@ + + + + attachment.ttl + 7 + + diff --git a/base_export_async/data/cron.xml b/base_export_async/data/cron.xml new file mode 100644 index 0000000000..351fdbc127 --- /dev/null +++ b/base_export_async/data/cron.xml @@ -0,0 +1,11 @@ + + + + Delete Generated Exports + + code + model.cron_delete() + 1 + days + + diff --git a/base_export_async/data/mail_template.xml b/base_export_async/data/mail_template.xml new file mode 100644 index 0000000000..3753be2442 --- /dev/null +++ b/base_export_async/data/mail_template.xml @@ -0,0 +1,26 @@ + + + + Delay Export + Export {{ object.model_description }} {{ datetime.date.today() }} + + + +

Your export is available here.

+

It will be automatically deleted the .

+
+

+ This is an automated message please do not reply. +

+
+
+
diff --git a/base_export_async/i18n/base_export_async.pot b/base_export_async/i18n/base_export_async.pot new file mode 100644 index 0000000000..ca8e974aaa --- /dev/null +++ b/base_export_async/i18n/base_export_async.pot @@ -0,0 +1,144 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_export_async +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/xml/base.xml:0 +#, python-format +msgid "(You will receive the export by email)" +msgstr "" + +#. module: base_export_async +#: model:mail.template,body_html:base_export_async.delay_export_mail_template +msgid "" +"

Your export is available here.

\n" +"

It will be automatically deleted the .

\n" +"
\n" +"

\n" +" This is an automated message please do not reply.\n" +"

\n" +" " +msgstr "" + +#. module: base_export_async +#: model:ir.model,name:base_export_async.model_delay_export +msgid "Asynchronous Export" +msgstr "" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/xml/base.xml:0 +#, python-format +msgid "Asynchronous export" +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__create_uid +msgid "Created by" +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__create_date +msgid "Created on" +msgstr "" + +#. module: base_export_async +#: model:mail.template,name:base_export_async.delay_export_mail_template +msgid "Delay Export" +msgstr "" + +#. module: base_export_async +#: model:ir.actions.server,name:base_export_async.to_delete_attachment_ir_actions_server +#: model:ir.cron,cron_name:base_export_async.to_delete_attachment +msgid "Delete Generated Exports" +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__display_name +msgid "Display Name" +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__expiration_date +msgid "Expiration Date" +msgstr "" + +#. module: base_export_async +#: model:mail.template,subject:base_export_async.delay_export_mail_template +msgid "Export {{ object.model_description }} {{ datetime.date.today() }}" +msgstr "" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/list_controller.esm.js:0 +#, python-format +msgid "External ID" +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__id +msgid "ID" +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export____last_update +msgid "Last Modified on" +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__write_date +msgid "Last Updated on" +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__model_description +msgid "Model Description" +msgstr "" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/data_export.esm.js:0 +#, python-format +msgid "Please select fields to save export list..." +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__url +msgid "Url" +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__user_ids +msgid "Users" +msgstr "" + +#. module: base_export_async +#. odoo-python +#: code:addons/base_export_async/models/delay_export.py:0 +#, python-format +msgid "You must set an email address to your user." +msgstr "" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/list_controller.esm.js:0 +#, python-format +msgid "You will receive the export file by email as soon as it is finished." +msgstr "" diff --git a/base_export_async/i18n/da.po b/base_export_async/i18n/da.po new file mode 100644 index 0000000000..0f916ce005 --- /dev/null +++ b/base_export_async/i18n/da.po @@ -0,0 +1,179 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_export_async +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-02-07 17:45+0000\n" +"Last-Translator: Hans Henrik Gabelgaard \n" +"Language-Team: none\n" +"Language: da\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/xml/base.xml:0 +#, python-format +msgid "(You will receive the export by email)" +msgstr "(Du vil modtage eksporten via mail)" + +#. module: base_export_async +#: model:mail.template,body_html:base_export_async.delay_export_mail_template +msgid "" +"

Your export is available here.

\n" +"

It will be automatically deleted the .

\n" +"
\n" +"

\n" +" This is an automated message " +"please do not reply.\n" +"

\n" +" " +msgstr "" + +#. module: base_export_async +#: model:ir.model,name:base_export_async.model_delay_export +msgid "Asynchronous Export" +msgstr "Asynkron export" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/xml/base.xml:0 +#, python-format +msgid "Asynchronous export" +msgstr "Asynkron export" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__create_uid +msgid "Created by" +msgstr "Oprettet af" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__create_date +msgid "Created on" +msgstr "Oprettet den" + +#. module: base_export_async +#: model:mail.template,name:base_export_async.delay_export_mail_template +msgid "Delay Export" +msgstr "" + +#. module: base_export_async +#: model:ir.actions.server,name:base_export_async.to_delete_attachment_ir_actions_server +#: model:ir.cron,cron_name:base_export_async.to_delete_attachment +msgid "Delete Generated Exports" +msgstr "Slet genererede eksporter" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__display_name +msgid "Display Name" +msgstr "Vist navn" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__expiration_date +msgid "Expiration Date" +msgstr "" + +#. module: base_export_async +#: model:mail.template,subject:base_export_async.delay_export_mail_template +msgid "Export {{ object.model_description }} {{ datetime.date.today() }}" +msgstr "" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/list_controller.esm.js:0 +#, python-format +msgid "External ID" +msgstr "External ID" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__id +msgid "ID" +msgstr "ID" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export____last_update +msgid "Last Modified on" +msgstr "Senest rettet den" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__write_uid +msgid "Last Updated by" +msgstr "Senest rettet af" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__write_date +msgid "Last Updated on" +msgstr "Senest rettet den" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__model_description +msgid "Model Description" +msgstr "" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/data_export.esm.js:0 +#, python-format +msgid "Please select fields to save export list..." +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__url +msgid "Url" +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__user_ids +msgid "Users" +msgstr "Brugere" + +#. module: base_export_async +#. odoo-python +#: code:addons/base_export_async/models/delay_export.py:0 +#, python-format +msgid "You must set an email address to your user." +msgstr "Du skal have en email adresse på dit brugeropsæt." + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/list_controller.esm.js:0 +#, python-format +msgid "You will receive the export file by email as soon as it is finished." +msgstr "Du vil modtage et link til eksporten så snart den er færdig." + +#, python-format +#~ msgid "Please select fields to export..." +#~ msgstr "Vælg venligst felter til eksporten..." + +#, python-format +#~ msgid "" +#~ "\n" +#~ "

Your export is available here.

\n" +#~ "

It will be automatically deleted the {}.

\n" +#~ "

 

\n" +#~ "

\n" +#~ " This is an automated message please do not reply.\n" +#~ "

\n" +#~ " " +#~ msgstr "" +#~ "\n" +#~ "

Din export er tilgængelig her.

\n" +#~ "

Den vil atutomatisk blive slettet den {}.

\n" +#~ "

 

\n" +#~ "

\n" +#~ " Dette er en automatisk besked. Undlad venlisgt at " +#~ "besvare.\n" +#~ "

\n" +#~ " " + +#, python-format +#~ msgid "Export {} {}" +#~ msgstr "Eksport {} {}" diff --git a/base_export_async/i18n/de.po b/base_export_async/i18n/de.po new file mode 100644 index 0000000000..9790dcb024 --- /dev/null +++ b/base_export_async/i18n/de.po @@ -0,0 +1,188 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_export_async +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-07-04 14:43+0000\n" +"Last-Translator: Maria Sparenberg \n" +"Language-Team: none\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.7.1\n" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/xml/base.xml:0 +#, python-format +msgid "(You will receive the export by email)" +msgstr "(Der Export wird per Mail bereitgestellt.)" + +#. module: base_export_async +#: model:mail.template,body_html:base_export_async.delay_export_mail_template +msgid "" +"

Your export is available here.

\n" +"

It will be automatically deleted the .

\n" +"
\n" +"

\n" +" This is an automated message " +"please do not reply.\n" +"

\n" +" " +msgstr "" + +#. module: base_export_async +#: model:ir.model,name:base_export_async.model_delay_export +#, fuzzy +msgid "Asynchronous Export" +msgstr "Asynchroner Export" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/xml/base.xml:0 +#, python-format +msgid "Asynchronous export" +msgstr "Asynchroner Export" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__create_uid +msgid "Created by" +msgstr "Erstellt von" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__create_date +msgid "Created on" +msgstr "Erstellt am" + +#. module: base_export_async +#: model:mail.template,name:base_export_async.delay_export_mail_template +msgid "Delay Export" +msgstr "" + +#. module: base_export_async +#: model:ir.actions.server,name:base_export_async.to_delete_attachment_ir_actions_server +#: model:ir.cron,cron_name:base_export_async.to_delete_attachment +msgid "Delete Generated Exports" +msgstr "Erzeugte Exporte löschen" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__display_name +msgid "Display Name" +msgstr "Anzeigename" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__expiration_date +msgid "Expiration Date" +msgstr "" + +#. module: base_export_async +#: model:mail.template,subject:base_export_async.delay_export_mail_template +msgid "Export {{ object.model_description }} {{ datetime.date.today() }}" +msgstr "" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/list_controller.esm.js:0 +#, python-format +msgid "External ID" +msgstr "Externe ID" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__id +msgid "ID" +msgstr "ID" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export____last_update +msgid "Last Modified on" +msgstr "Zuletzt geändert am" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__write_uid +msgid "Last Updated by" +msgstr "Zuletzt aktualisiert von" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__write_date +msgid "Last Updated on" +msgstr "Zuletzt aktualisiert am" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__model_description +msgid "Model Description" +msgstr "" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/data_export.esm.js:0 +#, python-format +msgid "Please select fields to save export list..." +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__url +msgid "Url" +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__user_ids +msgid "Users" +msgstr "Benutzer" + +#. module: base_export_async +#. odoo-python +#: code:addons/base_export_async/models/delay_export.py:0 +#, python-format +msgid "You must set an email address to your user." +msgstr "" +"Der aktuelle Benutzer hat keine Email-Adresse. Es muss eine gesetzt werden." + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/list_controller.esm.js:0 +#, python-format +msgid "You will receive the export file by email as soon as it is finished." +msgstr "" +"Die Export-Datei wird per Email versendet, sobald der Export beendet ist." + +#, python-format +#~ msgid "Please select fields to export..." +#~ msgstr "Bitte Felder für den Export auswählen..." + +#, python-format +#~ msgid "" +#~ "\n" +#~ "

Your export is available here.

\n" +#~ "

It will be automatically deleted the {}.

\n" +#~ "

 

\n" +#~ "

\n" +#~ " This is an automated message please do not reply.\n" +#~ "

\n" +#~ " " +#~ msgstr "" +#~ "\n" +#~ "

Der Export ist hier verfügbar.

\n" +#~ "

Das {} wird automatisch gelöscht.

\n" +#~ "

 

\n" +#~ "

\n" +#~ " Dies ist eine automatisch erstellte Nachricht, bitte " +#~ "nicht darauf antworten.\n" +#~ "

\n" +#~ " " + +#, python-format +#~ msgid "Export {} {}" +#~ msgstr "Export {} {}" + +#~ msgid "Allow to delay the export" +#~ msgstr "Verzögerung des Exports erlauben" + +#~ msgid "The user doesn't have an email address." +#~ msgstr "Der Benutzer hat keine Email-Adresse." diff --git a/base_export_async/i18n/es.po b/base_export_async/i18n/es.po new file mode 100644 index 0000000000..5e2890a11e --- /dev/null +++ b/base_export_async/i18n/es.po @@ -0,0 +1,164 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_export_async +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-07-25 00:18+0000\n" +"Last-Translator: bencoronel \n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/xml/base.xml:0 +#, python-format +msgid "(You will receive the export by email)" +msgstr "(Recibirás la exportación por correo electrónico)" + +#. module: base_export_async +#: model:mail.template,body_html:base_export_async.delay_export_mail_template +msgid "" +"

Your export is available here.

\n" +"

It will be automatically deleted the .

\n" +"
\n" +"

\n" +" This is an automated message " +"please do not reply.\n" +"

\n" +" " +msgstr "" +"

Tu exportación está disponible aquí.

\n" +"

Se eliminará automáticamente el .

\n" +"
\n" +"

\n" +" Este es un mensaje " +"automatizado, por favor no responder.\n" +"

\n" +" " + +#. module: base_export_async +#: model:ir.model,name:base_export_async.model_delay_export +msgid "Asynchronous Export" +msgstr "Exportación Asíncrona" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/xml/base.xml:0 +#, python-format +msgid "Asynchronous export" +msgstr "Exportación asíncrona" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__create_date +msgid "Created on" +msgstr "Creado el" + +#. module: base_export_async +#: model:mail.template,name:base_export_async.delay_export_mail_template +msgid "Delay Export" +msgstr "Aplazar Exportación" + +#. module: base_export_async +#: model:ir.actions.server,name:base_export_async.to_delete_attachment_ir_actions_server +#: model:ir.cron,cron_name:base_export_async.to_delete_attachment +msgid "Delete Generated Exports" +msgstr "Eliminar Exportaciones Generadas" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__display_name +msgid "Display Name" +msgstr "Nombre mostrado" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__expiration_date +msgid "Expiration Date" +msgstr "Fecha de vencimiento" + +#. module: base_export_async +#: model:mail.template,subject:base_export_async.delay_export_mail_template +msgid "Export {{ object.model_description }} {{ datetime.date.today() }}" +msgstr "Exportación {{ object.model_description }} {{ datetime.date.today() }}" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/list_controller.esm.js:0 +#, python-format +msgid "External ID" +msgstr "ID Externo" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__id +msgid "ID" +msgstr "ID" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export____last_update +msgid "Last Modified on" +msgstr "Última fecha de modificación" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__write_uid +msgid "Last Updated by" +msgstr "Última Actualización por" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__write_date +msgid "Last Updated on" +msgstr "Última fecha de actualización" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__model_description +msgid "Model Description" +msgstr "Descripción del modelo" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/data_export.esm.js:0 +#, python-format +msgid "Please select fields to save export list..." +msgstr "" +"Por favor, seleccione los campos para guardar la lista de exportación..." + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__url +msgid "Url" +msgstr "Url" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__user_ids +msgid "Users" +msgstr "Usuarios" + +#. module: base_export_async +#. odoo-python +#: code:addons/base_export_async/models/delay_export.py:0 +#, python-format +msgid "You must set an email address to your user." +msgstr "" +"Debes proporcionar una dirección de correo electrónico para tu usuario." + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/list_controller.esm.js:0 +#, python-format +msgid "You will receive the export file by email as soon as it is finished." +msgstr "" +"Recibirás el archivo de exportación por correo electrónico tan pronto como " +"acabe." diff --git a/base_export_async/i18n/fr.po b/base_export_async/i18n/fr.po new file mode 100644 index 0000000000..64171be55e --- /dev/null +++ b/base_export_async/i18n/fr.po @@ -0,0 +1,191 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_export_async +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-05-01 15:36+0000\n" +"Last-Translator: c2cdidier \n" +"Language-Team: none\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/xml/base.xml:0 +#, python-format +msgid "(You will receive the export by email)" +msgstr "(Vous recevrez cet export par courriel)" + +#. module: base_export_async +#: model:mail.template,body_html:base_export_async.delay_export_mail_template +msgid "" +"

Your export is available here.

\n" +"

It will be automatically deleted the .

\n" +"
\n" +"

\n" +" This is an automated message " +"please do not reply.\n" +"

\n" +" " +msgstr "" +"

Votre export est disponibleici.

\n" +"

Il sera automatiquement supprimé le.

\n" +"
\n" +"

\n" +" Ce message est " +"automatique, merci de ne pas y répondre.\n" +"

\n" +" " + +#. module: base_export_async +#: model:ir.model,name:base_export_async.model_delay_export +msgid "Asynchronous Export" +msgstr "Export asynchrone" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/xml/base.xml:0 +#, python-format +msgid "Asynchronous export" +msgstr "Export asynchrone" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__create_uid +msgid "Created by" +msgstr "Créé par" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__create_date +msgid "Created on" +msgstr "Créé le" + +#. module: base_export_async +#: model:mail.template,name:base_export_async.delay_export_mail_template +msgid "Delay Export" +msgstr "Retarder l'exportation" + +#. module: base_export_async +#: model:ir.actions.server,name:base_export_async.to_delete_attachment_ir_actions_server +#: model:ir.cron,cron_name:base_export_async.to_delete_attachment +msgid "Delete Generated Exports" +msgstr "Supprimer les exports générés" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__expiration_date +msgid "Expiration Date" +msgstr "Date d'expiration" + +#. module: base_export_async +#: model:mail.template,subject:base_export_async.delay_export_mail_template +msgid "Export {{ object.model_description }} {{ datetime.date.today() }}" +msgstr "Exportation {{ object.model_description }} {{ datetime.date.today() }}" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/list_controller.esm.js:0 +#, python-format +msgid "External ID" +msgstr "Identifiant externe" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__id +msgid "ID" +msgstr "ID" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export____last_update +msgid "Last Modified on" +msgstr "Dernière modification le" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__write_uid +msgid "Last Updated by" +msgstr "Dernière mise à jour par" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__write_date +msgid "Last Updated on" +msgstr "Dernière mise à jour le" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__model_description +msgid "Model Description" +msgstr "Description du modèle" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/data_export.esm.js:0 +#, python-format +msgid "Please select fields to save export list..." +msgstr "" +"Veuillez sélectionner les champs pour enregistrer la liste d'exportation..." + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__url +msgid "Url" +msgstr "Url" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__user_ids +msgid "Users" +msgstr "Utilisateurs" + +#. module: base_export_async +#. odoo-python +#: code:addons/base_export_async/models/delay_export.py:0 +#, python-format +msgid "You must set an email address to your user." +msgstr "Vous devez définir une adresse e-mail pour votre utilisateur." + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/list_controller.esm.js:0 +#, python-format +msgid "You will receive the export file by email as soon as it is finished." +msgstr "Vous recevrez le fichier d'export par courriel dès qu'il sera terminé." + +#, python-format +#~ msgid "Please select fields to export..." +#~ msgstr "Veuillez choisir les champs à exporter..." + +#, python-format +#~ msgid "" +#~ "\n" +#~ "

Your export is available here.

\n" +#~ "

It will be automatically deleted the {}.

\n" +#~ "

 

\n" +#~ "

\n" +#~ " This is an automated message please do not reply.\n" +#~ "

\n" +#~ " " +#~ msgstr "" +#~ "\n" +#~ "

Votre export est disponible ici.\n" +#~ "

Il sera automatiquement supprimé le {}.

\n" +#~ "

 

\n" +#~ "

\n" +#~ " Ceci est un message automatisé, merci de ne pas " +#~ "répondre.\n" +#~ "

\n" +#~ " " + +#, python-format +#~ msgid "Export {} {}" +#~ msgstr "Export {} {}" diff --git a/base_export_async/i18n/hr.po b/base_export_async/i18n/hr.po new file mode 100644 index 0000000000..4c54f497a4 --- /dev/null +++ b/base_export_async/i18n/hr.po @@ -0,0 +1,146 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_export_async +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/xml/base.xml:0 +#, python-format +msgid "(You will receive the export by email)" +msgstr "" + +#. module: base_export_async +#: model:mail.template,body_html:base_export_async.delay_export_mail_template +msgid "" +"

Your export is available here.

\n" +"

It will be automatically deleted the .

\n" +"
\n" +"

\n" +" This is an automated message please do not reply.\n" +"

\n" +" " +msgstr "" + +#. module: base_export_async +#: model:ir.model,name:base_export_async.model_delay_export +msgid "Asynchronous Export" +msgstr "" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/xml/base.xml:0 +#, python-format +msgid "Asynchronous export" +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__create_uid +msgid "Created by" +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__create_date +msgid "Created on" +msgstr "" + +#. module: base_export_async +#: model:mail.template,name:base_export_async.delay_export_mail_template +msgid "Delay Export" +msgstr "" + +#. module: base_export_async +#: model:ir.actions.server,name:base_export_async.to_delete_attachment_ir_actions_server +#: model:ir.cron,cron_name:base_export_async.to_delete_attachment +msgid "Delete Generated Exports" +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__display_name +msgid "Display Name" +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__expiration_date +msgid "Expiration Date" +msgstr "" + +#. module: base_export_async +#: model:mail.template,subject:base_export_async.delay_export_mail_template +msgid "Export {{ object.model_description }} {{ datetime.date.today() }}" +msgstr "" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/list_controller.esm.js:0 +#, python-format +msgid "External ID" +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__id +msgid "ID" +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export____last_update +msgid "Last Modified on" +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__write_date +msgid "Last Updated on" +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__model_description +msgid "Model Description" +msgstr "" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/data_export.esm.js:0 +#, python-format +msgid "Please select fields to save export list..." +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__url +msgid "Url" +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__user_ids +msgid "Users" +msgstr "" + +#. module: base_export_async +#. odoo-python +#: code:addons/base_export_async/models/delay_export.py:0 +#, python-format +msgid "You must set an email address to your user." +msgstr "" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/list_controller.esm.js:0 +#, python-format +msgid "You will receive the export file by email as soon as it is finished." +msgstr "" diff --git a/base_export_async/i18n/it.po b/base_export_async/i18n/it.po new file mode 100644 index 0000000000..6d17c1cf06 --- /dev/null +++ b/base_export_async/i18n/it.po @@ -0,0 +1,160 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_export_async +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-04-04 11:38+0000\n" +"Last-Translator: mymage \n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/xml/base.xml:0 +#, python-format +msgid "(You will receive the export by email)" +msgstr "(Verrà inviata l'esportazione vie e-mail)" + +#. module: base_export_async +#: model:mail.template,body_html:base_export_async.delay_export_mail_template +msgid "" +"

Your export is available here.

\n" +"

It will be automatically deleted the .

\n" +"
\n" +"

\n" +" This is an automated message " +"please do not reply.\n" +"

\n" +" " +msgstr "" +"

L'esportazione è disponibile qui.

\n" +"

Verrà cancellata automaticamente il .

\n" +"
\n" +"

\n" +" Questo è un messaggio " +"atomatico, non rispondere.\n" +"

\n" +" " + +#. module: base_export_async +#: model:ir.model,name:base_export_async.model_delay_export +msgid "Asynchronous Export" +msgstr "Esportazione asincrona" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/xml/base.xml:0 +#, python-format +msgid "Asynchronous export" +msgstr "Esportazione asincrona" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__create_uid +msgid "Created by" +msgstr "Creato da" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__create_date +msgid "Created on" +msgstr "Creato il" + +#. module: base_export_async +#: model:mail.template,name:base_export_async.delay_export_mail_template +msgid "Delay Export" +msgstr "Ritarda esportazione" + +#. module: base_export_async +#: model:ir.actions.server,name:base_export_async.to_delete_attachment_ir_actions_server +#: model:ir.cron,cron_name:base_export_async.to_delete_attachment +msgid "Delete Generated Exports" +msgstr "Cancella esportazioni generate" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__display_name +msgid "Display Name" +msgstr "Nome visualizzato" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__expiration_date +msgid "Expiration Date" +msgstr "Data di scadenza" + +#. module: base_export_async +#: model:mail.template,subject:base_export_async.delay_export_mail_template +msgid "Export {{ object.model_description }} {{ datetime.date.today() }}" +msgstr "Esportazione {{ object.model_description }} {{ datetime.date.today() }}" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/list_controller.esm.js:0 +#, python-format +msgid "External ID" +msgstr "ID esterno" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__id +msgid "ID" +msgstr "ID" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export____last_update +msgid "Last Modified on" +msgstr "Ultima modifica il" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__write_uid +msgid "Last Updated by" +msgstr "Ultimo aggiornamento di" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__write_date +msgid "Last Updated on" +msgstr "Ultimo aggiornamento il" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__model_description +msgid "Model Description" +msgstr "Descrizione modello" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/data_export.esm.js:0 +#, python-format +msgid "Please select fields to save export list..." +msgstr "Selezionare campi per salvare elenco esportazione..." + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__url +msgid "Url" +msgstr "URL" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__user_ids +msgid "Users" +msgstr "Utenti" + +#. module: base_export_async +#. odoo-python +#: code:addons/base_export_async/models/delay_export.py:0 +#, python-format +msgid "You must set an email address to your user." +msgstr "Bisogna impostare una e-mail nel proprio utente." + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/list_controller.esm.js:0 +#, python-format +msgid "You will receive the export file by email as soon as it is finished." +msgstr "Verrà inviato via e-mail il file esportazione appena sarà completato." diff --git a/base_export_async/i18n/pt.po b/base_export_async/i18n/pt.po new file mode 100644 index 0000000000..2240c2f246 --- /dev/null +++ b/base_export_async/i18n/pt.po @@ -0,0 +1,180 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_export_async +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-03-04 16:45+0000\n" +"Last-Translator: Pedro Castro Silva \n" +"Language-Team: none\n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/xml/base.xml:0 +#, python-format +msgid "(You will receive the export by email)" +msgstr "(Receberá a exportação por email)" + +#. module: base_export_async +#: model:mail.template,body_html:base_export_async.delay_export_mail_template +msgid "" +"

Your export is available here.

\n" +"

It will be automatically deleted the .

\n" +"
\n" +"

\n" +" This is an automated message " +"please do not reply.\n" +"

\n" +" " +msgstr "" + +#. module: base_export_async +#: model:ir.model,name:base_export_async.model_delay_export +msgid "Asynchronous Export" +msgstr "Exportação Assíncrona" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/xml/base.xml:0 +#, python-format +msgid "Asynchronous export" +msgstr "Exportação assíncrona" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__create_uid +msgid "Created by" +msgstr "Criada por" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__create_date +msgid "Created on" +msgstr "Criado em" + +#. module: base_export_async +#: model:mail.template,name:base_export_async.delay_export_mail_template +msgid "Delay Export" +msgstr "" + +#. module: base_export_async +#: model:ir.actions.server,name:base_export_async.to_delete_attachment_ir_actions_server +#: model:ir.cron,cron_name:base_export_async.to_delete_attachment +msgid "Delete Generated Exports" +msgstr "Eliminar Exportações Geradas" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__display_name +msgid "Display Name" +msgstr "Nome a Apresentar" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__expiration_date +msgid "Expiration Date" +msgstr "" + +#. module: base_export_async +#: model:mail.template,subject:base_export_async.delay_export_mail_template +msgid "Export {{ object.model_description }} {{ datetime.date.today() }}" +msgstr "" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/list_controller.esm.js:0 +#, python-format +msgid "External ID" +msgstr "ID Externo" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__id +msgid "ID" +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export____last_update +msgid "Last Modified on" +msgstr "Última Modificação em" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__write_uid +msgid "Last Updated by" +msgstr "Última Atualização por" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__write_date +msgid "Last Updated on" +msgstr "Última Atualização em" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__model_description +msgid "Model Description" +msgstr "" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/data_export.esm.js:0 +#, python-format +msgid "Please select fields to save export list..." +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__url +msgid "Url" +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__user_ids +msgid "Users" +msgstr "Utilizadores" + +#. module: base_export_async +#. odoo-python +#: code:addons/base_export_async/models/delay_export.py:0 +#, python-format +msgid "You must set an email address to your user." +msgstr "Tem que atribuir um email ao seu utilizador." + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/list_controller.esm.js:0 +#, python-format +msgid "You will receive the export file by email as soon as it is finished." +msgstr "" +"Receberá o ficheiro de exportação por email assim que este estiver terminado." + +#, python-format +#~ msgid "Please select fields to export..." +#~ msgstr "Por favor, selecione os campos a exportar..." + +#, python-format +#~ msgid "" +#~ "\n" +#~ "

Your export is available here.

\n" +#~ "

It will be automatically deleted the {}.

\n" +#~ "

 

\n" +#~ "

\n" +#~ " This is an automated message please do not reply.\n" +#~ "

\n" +#~ " " +#~ msgstr "" +#~ "\n" +#~ "

A sua exportação está disponível aqui.

\n" +#~ "

Será automaticamente eliminada em {}.

\n" +#~ "

 

\n" +#~ "

\n" +#~ " Esta é uma mensagem automática. Por favor, não responda.\n" +#~ "

\n" +#~ " " + +#, python-format +#~ msgid "Export {} {}" +#~ msgstr "Exportar {} {}" diff --git a/base_export_async/i18n/zh_CN.po b/base_export_async/i18n/zh_CN.po new file mode 100644 index 0000000000..6e9b54ac8a --- /dev/null +++ b/base_export_async/i18n/zh_CN.po @@ -0,0 +1,185 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_export_async +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-07-25 17:43+0000\n" +"Last-Translator: 黎伟杰 <674416404@qq.com>\n" +"Language-Team: none\n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 3.7.1\n" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/xml/base.xml:0 +#, python-format +msgid "(You will receive the export by email)" +msgstr "(您将通过电子邮件收到导出)" + +#. module: base_export_async +#: model:mail.template,body_html:base_export_async.delay_export_mail_template +msgid "" +"

Your export is available here.

\n" +"

It will be automatically deleted the .

\n" +"
\n" +"

\n" +" This is an automated message " +"please do not reply.\n" +"

\n" +" " +msgstr "" + +#. module: base_export_async +#: model:ir.model,name:base_export_async.model_delay_export +#, fuzzy +msgid "Asynchronous Export" +msgstr "异步导出" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/xml/base.xml:0 +#, python-format +msgid "Asynchronous export" +msgstr "异步导出" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__create_uid +msgid "Created by" +msgstr "创建者" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__create_date +msgid "Created on" +msgstr "创建时间" + +#. module: base_export_async +#: model:mail.template,name:base_export_async.delay_export_mail_template +msgid "Delay Export" +msgstr "" + +#. module: base_export_async +#: model:ir.actions.server,name:base_export_async.to_delete_attachment_ir_actions_server +#: model:ir.cron,cron_name:base_export_async.to_delete_attachment +msgid "Delete Generated Exports" +msgstr "删除生成的导出" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__display_name +msgid "Display Name" +msgstr "显示名称" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__expiration_date +msgid "Expiration Date" +msgstr "" + +#. module: base_export_async +#: model:mail.template,subject:base_export_async.delay_export_mail_template +msgid "Export {{ object.model_description }} {{ datetime.date.today() }}" +msgstr "" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/list_controller.esm.js:0 +#, python-format +msgid "External ID" +msgstr "外部ID" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__id +msgid "ID" +msgstr "ID" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export____last_update +msgid "Last Modified on" +msgstr "最后修改时间" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__write_uid +msgid "Last Updated by" +msgstr "最后更新者" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__write_date +msgid "Last Updated on" +msgstr "最后更新时间" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__model_description +msgid "Model Description" +msgstr "" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/data_export.esm.js:0 +#, python-format +msgid "Please select fields to save export list..." +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__url +msgid "Url" +msgstr "" + +#. module: base_export_async +#: model:ir.model.fields,field_description:base_export_async.field_delay_export__user_ids +msgid "Users" +msgstr "用户" + +#. module: base_export_async +#. odoo-python +#: code:addons/base_export_async/models/delay_export.py:0 +#, python-format +msgid "You must set an email address to your user." +msgstr "您必须为您的用户设置电子邮件地址。" + +#. module: base_export_async +#. odoo-javascript +#: code:addons/base_export_async/static/src/js/list_controller.esm.js:0 +#, python-format +msgid "You will receive the export file by email as soon as it is finished." +msgstr "完成后,您将通过电子邮件收到导出文件。" + +#, python-format +#~ msgid "Please select fields to export..." +#~ msgstr "请选择要导出的字段..." + +#, python-format +#~ msgid "" +#~ "\n" +#~ "

Your export is available here.

\n" +#~ "

It will be automatically deleted the {}.

\n" +#~ "

 

\n" +#~ "

\n" +#~ " This is an automated message please do not reply.\n" +#~ "

\n" +#~ " " +#~ msgstr "" +#~ "\n" +#~ "

你的导出可以用 这里.

\n" +#~ "

它将自动删除 {}。

\n" +#~ "

 

\n" +#~ "

\n" +#~ " 这是一条自动消息,请不要回复。\n" +#~ "

\n" +#~ " " + +#, python-format +#~ msgid "Export {} {}" +#~ msgstr "导出{} {}" + +#~ msgid "Allow to delay the export" +#~ msgstr "允许延迟导出" + +#~ msgid "The user doesn't have an email address." +#~ msgstr "用户没有电子邮件地址。" diff --git a/base_export_async/models/__init__.py b/base_export_async/models/__init__.py new file mode 100644 index 0000000000..f3652a9bf5 --- /dev/null +++ b/base_export_async/models/__init__.py @@ -0,0 +1,4 @@ +# Copyright 2019 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import delay_export diff --git a/base_export_async/models/delay_export.py b/base_export_async/models/delay_export.py new file mode 100644 index 0000000000..cca5c9c817 --- /dev/null +++ b/base_export_async/models/delay_export.py @@ -0,0 +1,154 @@ +# Copyright 2019 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +import base64 +import json +import operator + +from dateutil.relativedelta import relativedelta + +from odoo import api, fields, models +from odoo.exceptions import UserError +from odoo.http import request + +from odoo.addons.web.controllers.export import CSVExport, ExcelExport + + +class DelayExport(models.Model): + _name = "delay.export" + _description = "Asynchronous Export" + + user_ids = fields.Many2many("res.users", string="Users", index=True) + model_description = fields.Char() + url = fields.Char() + expiration_date = fields.Date() + + @api.model + def delay_export(self, data): + """Delay the export, called from js""" + params = json.loads(data.get("data")) + if not self.env.user.email: + raise UserError(self.env._("You must set an email address to your user.")) + self.with_delay().export(params) + + @api.model + def _get_file_content(self, params): + export_format = params.get("format") + + items = operator.itemgetter( + "model", "fields", "ids", "domain", "import_compat", "context", "user_ids" + )(params) + (model_name, fields_name, ids, domain, import_compat, context, user_ids) = items + + model = self.env[model_name].with_context( + import_compat=import_compat, **context + ) + records = model.browse(ids) or model.search( + domain, offset=0, limit=False, order=False + ) + + if not model._is_an_ordinary_table(): + fields_name = [field for field in fields_name if field["name"] != "id"] + + field_names = [f["name"] for f in fields_name] + import_data = records.export_data(field_names).get("datas", []) + + if import_compat: + columns_headers = field_names + else: + columns_headers = [val["label"].strip() for val in fields_name] + + if export_format == "csv": + csv = CSVExport() + return csv.from_data(field_names, columns_headers, import_data).encode( + "utf-8" + ) + else: + xls = ExcelExport() + return xls.from_data(field_names, columns_headers, import_data) + + @api.model + def export(self, params): + """Delayed export of a file sent by email + + The ``params`` is a dict of parameters, contains: + + * format: csv/excel + * model: model to export + * fields: list of fields to export, a list of dict: + [{'label': '', 'name': ''}] + * ids: list of ids to export + * domain: domain for the export + * context: context for the export (language, ...) + * import_compat: if the export is export/import compatible (boolean) + * user_ids: optional list of user ids who receive the file + """ + + # `ExportXlsxWriter` gets the environment from `request.env` + if request: + request.update_env(user=self.env.user) + content = self._get_file_content(params) + + items = operator.itemgetter("model", "context", "format", "user_ids")(params) + model_name, context, export_format, user_ids = items + users = self.env["res.users"].browse(user_ids) + + export_record = self.sudo().create({"user_ids": [(6, 0, users.ids)]}) + + name = f"{model_name}.{export_format}" + attachment = ( + self.env["ir.attachment"] + .sudo() + .create( + { + "name": name, + "datas": base64.b64encode(content), + "type": "binary", + "res_model": self._name, + "res_id": export_record.id, + } + ) + ) + + url = "{}/web/content/ir.attachment/{}/datas/{}?download=true".format( + self.env["ir.config_parameter"].sudo().get_param("web.base.url"), + attachment.id, + attachment.name, + ) + + time_to_live = ( + self.env["ir.config_parameter"].sudo().get_param("attachment.ttl", 7) + ) + date_today = fields.Date.today() + expiration_date = fields.Date.to_string( + date_today + relativedelta(days=+int(time_to_live)) + ) + + odoo_bot = self.sudo().env.ref("base.partner_root") + email_from = odoo_bot.email + model_description = self.env[model_name]._description + export_record.write( + { + "url": url, + "expiration_date": expiration_date, + "model_description": model_description, + } + ) + + self.env.ref("base_export_async.delay_export_mail_template").send_mail( + export_record.id, + email_values={ + "email_from": email_from, + "reply_to": email_from, + "recipient_ids": [(6, 0, users.mapped("partner_id").ids)], + }, + ) + + @api.model + def cron_delete(self): + time_to_live = ( + self.env["ir.config_parameter"].sudo().get_param("attachment.ttl", 7) + ) + date_today = fields.Date.today() + date_to_delete = date_today + relativedelta(days=-int(time_to_live)) + self.search([("create_date", "<=", date_to_delete)]).unlink() diff --git a/base_export_async/pyproject.toml b/base_export_async/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/base_export_async/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/base_export_async/readme/CONTRIBUTORS.md b/base_export_async/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..ac7b3fd83b --- /dev/null +++ b/base_export_async/readme/CONTRIBUTORS.md @@ -0,0 +1,2 @@ +- Arnaud Pineux (ACSONE SA/NV) authored the initial prototype. +- Guewen Baconnier (Camptocamp) diff --git a/base_export_async/readme/DESCRIPTION.md b/base_export_async/readme/DESCRIPTION.md new file mode 100644 index 0000000000..28fef1b090 --- /dev/null +++ b/base_export_async/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +Standard Export can be delayed in asynchronous jobs executed in the +background and then send by email to the user. diff --git a/base_export_async/readme/USAGE.md b/base_export_async/readme/USAGE.md new file mode 100644 index 0000000000..fe45f0b33a --- /dev/null +++ b/base_export_async/readme/USAGE.md @@ -0,0 +1,5 @@ +The user is presented with a new checkbox "Asynchronous export" in the +export screen. When selected, the export is delayed in a background job. + +The .csv or .xls file generated by the export will be sent by email to +the user who execute the export. diff --git a/base_export_async/security/ir.model.access.csv b/base_export_async/security/ir.model.access.csv new file mode 100644 index 0000000000..948323af24 --- /dev/null +++ b/base_export_async/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_delay_export,delay.export.user,model_delay_export,base.group_user,1,0,0,0 +access_delay_export_sudo,delay.export.sudo,model_delay_export,base.group_no_one,1,1,1,1 diff --git a/base_export_async/security/ir_rule.xml b/base_export_async/security/ir_rule.xml new file mode 100644 index 0000000000..d7934f09ae --- /dev/null +++ b/base_export_async/security/ir_rule.xml @@ -0,0 +1,13 @@ + + + + Only user can read delay.export + + + + + + + [('user_ids', 'in', user.id)] + + diff --git a/base_export_async/static/description/icon.png b/base_export_async/static/description/icon.png new file mode 100644 index 0000000000..3a0328b516 Binary files /dev/null and b/base_export_async/static/description/icon.png differ diff --git a/base_export_async/static/description/index.html b/base_export_async/static/description/index.html new file mode 100644 index 0000000000..2a04cc8043 --- /dev/null +++ b/base_export_async/static/description/index.html @@ -0,0 +1,433 @@ + + + + + +Base Export Async + + + +
+

Base Export Async

+ + +

Beta License: AGPL-3 OCA/queue Translate me on Weblate Try me on Runboat

+

Standard Export can be delayed in asynchronous jobs executed in the +background and then send by email to the user.

+

Table of contents

+ +
+

Usage

+

The user is presented with a new checkbox “Asynchronous export” in the +export screen. When selected, the export is delayed in a background job.

+

The .csv or .xls file generated by the export will be sent by email to +the user who execute the export.

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • ACSONE SA/NV
  • +
+
+
+

Contributors

+
    +
  • Arnaud Pineux (ACSONE SA/NV) authored the initial prototype.
  • +
  • Guewen Baconnier (Camptocamp)
  • +
+
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/queue project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/base_export_async/static/src/js/data_export.esm.js b/base_export_async/static/src/js/data_export.esm.js new file mode 100644 index 0000000000..a86e45c276 --- /dev/null +++ b/base_export_async/static/src/js/data_export.esm.js @@ -0,0 +1,29 @@ +import {ExportDataDialog} from "@web/views/view_dialogs/export_data_dialog"; +import {patch} from "@web/core/utils/patch"; + +patch(ExportDataDialog.prototype, { + patchName: "base_export_async", + setup() { + super.setup(); + this.state.async = false; + }, + onToggleExportAsync(value) { + this.state.async = value; + }, + async onClickExportButton() { + if (!this.state.exportList.length) { + return this.notification.add( + this.env._t("Please select fields to save export list..."), + { + type: "danger", + } + ); + } + await this.props.download( + this.state.exportList, + this.state.isCompatible, + this.availableFormats[this.state.selectedFormat].tag, + this.state.async + ); + }, +}); diff --git a/base_export_async/static/src/js/list_controller.esm.js b/base_export_async/static/src/js/list_controller.esm.js new file mode 100644 index 0000000000..2a911d502c --- /dev/null +++ b/base_export_async/static/src/js/list_controller.esm.js @@ -0,0 +1,71 @@ +import {AlertDialog} from "@web/core/confirmation_dialog/confirmation_dialog"; +import {ListController} from "@web/views/list/list_controller"; +import {_t} from "@web/core/l10n/translation"; +import {download} from "@web/core/network/download"; +import {patch} from "@web/core/utils/patch"; + +patch(ListController.prototype, { + patchName: "base_export_async", + async downloadExport(fields, import_compat, format, async = false) { + const uiService = this.env.services.ui; + let ids = false; + if (!this.isDomainSelected) { + const resIds = await this.getSelectedResIds(); + ids = resIds.length > 0 && resIds; + } + const exportedFields = fields.map((field) => ({ + name: field.name || field.id, + label: field.label || field.string, + store: field.store, + type: field.field_type || field.type, + })); + if (import_compat) { + exportedFields.unshift({name: "id", label: this.env._t("External ID")}); + } + if (async) { + /* + Call the delay export if Async is checked + */ + uiService.block(); + const args = [ + { + data: JSON.stringify({ + format: format, + model: this.model.root.resModel, + fields: exportedFields, + ids: ids, + domain: this.model.root.domain, + context: this.props.context, + import_compat: import_compat, + user_ids: [this.props.context.uid], + }), + }, + ]; + const orm = this.env.services.orm; + orm.call("delay.export", "delay_export", args).then(() => { + uiService.unblock(); + this.env.services.dialog.add(AlertDialog, { + title: _t("Exported Files"), + body: _t( + "You will receive the export file by email as soon as it is finished." + ), + }); + }); + } else { + await download({ + data: { + data: JSON.stringify({ + import_compat, + context: this.props.context, + domain: this.model.root.domain, + fields: exportedFields, + groupby: this.model.root.groupBy, + ids, + model: this.model.root.resModel, + }), + }, + url: `/web/export/${format}`, + }); + } + }, +}); diff --git a/base_export_async/static/src/xml/base.xml b/base_export_async/static/src/xml/base.xml new file mode 100644 index 0000000000..2185bf1b9b --- /dev/null +++ b/base_export_async/static/src/xml/base.xml @@ -0,0 +1,20 @@ + + + + + + + Asynchronous export (You will receive the export by email) + + + + + diff --git a/base_export_async/tests/__init__.py b/base_export_async/tests/__init__.py new file mode 100644 index 0000000000..ab60bd836f --- /dev/null +++ b/base_export_async/tests/__init__.py @@ -0,0 +1,4 @@ +# Copyright 2019 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import test_base_export_async diff --git a/base_export_async/tests/test_base_export_async.py b/base_export_async/tests/test_base_export_async.py new file mode 100644 index 0000000000..d10ca04281 --- /dev/null +++ b/base_export_async/tests/test_base_export_async.py @@ -0,0 +1,100 @@ +# Copyright 2019 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +import json +from unittest import mock +from unittest.mock import patch + +import freezegun +from dateutil.relativedelta import relativedelta + +import odoo.tests.common as common +from odoo import fields + +from odoo.addons.web.controllers.export import ExcelExport + +data_csv = { + "data": """{"format": "csv", "model": "res.partner", + "fields": [{"name": "id", "label": "External ID"}, + {"name": "display_name", "label": "Display Name"}, + {"name": "email", "label": "Email"}, + {"name": "phone", "label": "Phone"}], + "ids": false, + "domain": [], + "context": {"lang": "en_US", "tz": "Europe/Brussels", "uid": 2}, + "import_compat": false, + "user_ids": [6] + }""" +} + +data_xls = { + "data": """{"format": "xls", "model": "res.partner", + "fields": [{"name": "id", "label": "External ID"}, + {"name": "display_name", "label": "Display Name"}, + {"name": "email", "label": "Email"}, + {"name": "phone", "label": "Phone"}], + "ids": false, + "domain": [], + "context": {"lang": "en_US", "tz": "Europe/Brussels", "uid": 2}, + "import_compat": false, + "user_ids": [6] + }""" +} + + +class TestBaseExportAsync(common.TransactionCase): + def setUp(self): + super().setUp() + self.delay_export_obj = self.env["delay.export"] + self.job_obj = self.env["queue.job"] + with patch("odoo.http._request_stack") as mock_request_stack: + mock_request = mock.Mock(env=self.env) + mock_request_stack.push(mock_request) + self.addCleanup(mock_request_stack.pop) + + def test_delay_export(self): + """Check that the call create a new JOB""" + nbr_job = len(self.job_obj.search([])) + self.delay_export_obj.delay_export(data_csv) + new_nbr_job = len(self.job_obj.search([])) + self.assertEqual(new_nbr_job, nbr_job + 1) + + def test_export_csv(self): + """Check that the export generate an attachment and email""" + params = json.loads(data_csv.get("data")) + mails = self.env["mail.mail"].search([]) + attachments = self.env["ir.attachment"].search([]) + self.delay_export_obj.export(params) + new_mail = self.env["mail.mail"].search([]) - mails + new_attachment = self.env["ir.attachment"].search([]) - attachments + self.assertEqual(len(new_mail), 1) + self.assertEqual(new_attachment.name, "res.partner.csv") + + def test_export_xls(self): + """Check that the export generate an attachment and email""" + params = json.loads(data_xls.get("data")) + mails = self.env["mail.mail"].search([]) + attachments = self.env["ir.attachment"].search([]) + with patch.object(ExcelExport, "from_data", return_value=b"\x41\x42\x43\x44"): + self.delay_export_obj.export(params) + new_mail = self.env["mail.mail"].search([]) - mails + new_attachment = self.env["ir.attachment"].search([]) - attachments + self.assertEqual(len(new_mail), 1) + self.assertEqual(new_attachment.name, "res.partner.xls") + + def test_cron_delete(self): + """Check that cron delete attachment after TTL""" + params = json.loads(data_csv.get("data")) + attachments = self.env["ir.attachment"].search([]) + self.delay_export_obj.export(params) + new_attachment = self.env["ir.attachment"].search([]) - attachments + time_to_live = ( + self.env["ir.config_parameter"].sudo().get_param("attachment.ttl", 7) + ) + date_today = fields.Datetime.now() + date_past_ttl = date_today + relativedelta(days=int(time_to_live)) + with freezegun.freeze_time(date_past_ttl): + self.delay_export_obj.cron_delete() + + # The attachment must be deleted + self.assertFalse(new_attachment.exists())