Skip to content

Commit 2ff6bf2

Browse files
committed
[MIG] base_export_async: migrate module
Migrate base_export_async module from 16.0 to 17.0
1 parent 7f5e5be commit 2ff6bf2

28 files changed

Lines changed: 2285 additions & 0 deletions

base_export_async/README.rst

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
=================
2+
Base Export Async
3+
=================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:9f35a2ee6042c86fff875f9a71682342e5892b923a4bd857bb5b90060376ea55
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fqueue-lightgray.png?logo=github
20+
:target: https://github.com/OCA/queue/tree/17.0/base_export_async
21+
:alt: OCA/queue
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/queue-17-0/queue-17-0-base_export_async
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/queue&target_branch=17.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
Standard Export can be delayed in asynchronous jobs executed in the
32+
background and then send by email to the user.
33+
34+
**Table of contents**
35+
36+
.. contents::
37+
:local:
38+
39+
Usage
40+
=====
41+
42+
The user is presented with a new checkbox "Asynchronous export" in the
43+
export screen. When selected, the export is delayed in a background job.
44+
45+
The .csv or .xls file generated by the export will be sent by email to
46+
the user who execute the export.
47+
48+
Bug Tracker
49+
===========
50+
51+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/queue/issues>`_.
52+
In case of trouble, please check there if your issue has already been reported.
53+
If you spotted it first, help us to smash it by providing a detailed and welcomed
54+
`feedback <https://github.com/OCA/queue/issues/new?body=module:%20base_export_async%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
55+
56+
Do not contact contributors directly about support or help with technical issues.
57+
58+
Credits
59+
=======
60+
61+
Authors
62+
-------
63+
64+
* ACSONE SA/NV
65+
66+
Contributors
67+
------------
68+
69+
- Arnaud Pineux (ACSONE SA/NV) authored the initial prototype.
70+
- Guewen Baconnier (Camptocamp)
71+
- Mitul Shah (TradeSolutions.Digital GmbH)
72+
73+
Maintainers
74+
-----------
75+
76+
This module is maintained by the OCA.
77+
78+
.. image:: https://odoo-community.org/logo.png
79+
:alt: Odoo Community Association
80+
:target: https://odoo-community.org
81+
82+
OCA, or the Odoo Community Association, is a nonprofit organization whose
83+
mission is to support the collaborative development of Odoo features and
84+
promote its widespread use.
85+
86+
This module is part of the `OCA/queue <https://github.com/OCA/queue/tree/17.0/base_export_async>`_ project on GitHub.
87+
88+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

base_export_async/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright 2019 ACSONE SA/NV
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
4+
from . import models

base_export_async/__manifest__.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright 2019 ACSONE SA/NV
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
4+
{
5+
"name": "Base Export Async",
6+
"summary": "Asynchronous export with job queue",
7+
"version": "17.0.1.0.0",
8+
"license": "AGPL-3",
9+
"author": "ACSONE SA/NV, Odoo Community Association (OCA)",
10+
"website": "https://github.com/OCA/queue",
11+
"depends": ["web", "queue_job"],
12+
"data": [
13+
# added this additional rule as when the export happens
14+
# from queue job module there is no user is there,
15+
# which was causing an issue when fetching res.currency
16+
"security/ir.model.access.csv",
17+
"security/ir_rule.xml",
18+
"data/config_parameter.xml",
19+
"data/cron.xml",
20+
"data/mail_template.xml",
21+
],
22+
"demo": [],
23+
"assets": {
24+
"web.assets_backend": [
25+
"base_export_async/static/src/xml/base.xml",
26+
"base_export_async/static/src/js/list_controller.esm.js",
27+
"base_export_async/static/src/js/data_export.esm.js",
28+
],
29+
},
30+
"installable": True,
31+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<odoo noupdate="1">
3+
<record id="attachment_ttl" model="ir.config_parameter">
4+
<field name="key">attachment.ttl</field>
5+
<field name="value">7</field>
6+
</record>
7+
</odoo>

base_export_async/data/cron.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<odoo>
3+
<record id="to_delete_attachment" model="ir.cron">
4+
<field name="name">Delete Generated Exports</field>
5+
<field name="model_id" ref="model_delay_export" />
6+
<field name="state">code</field>
7+
<field name="code">model.cron_delete()</field>
8+
<field name='interval_number'>1</field>
9+
<field name='interval_type'>days</field>
10+
<field name="numbercall">-1</field>
11+
</record>
12+
</odoo>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<odoo noupdate="1">
3+
<record id="delay_export_mail_template" model="mail.template">
4+
<field name="name">Delay Export</field>
5+
<field
6+
name="subject"
7+
>Export {{ object.model_description }} {{ datetime.date.today() }}</field>
8+
<field name="model_id" ref="base_export_async.model_delay_export" />
9+
<field name="auto_delete" eval="True" />
10+
<field name="body_html" type="html">
11+
<p>Your export is available <a
12+
t-attf-href="{{ object.url }}"
13+
target="_blank"
14+
>here</a>.</p>
15+
<p>It will be automatically deleted the <t
16+
t-out="object.expiration_date"
17+
/>.</p>
18+
<br />
19+
<p>
20+
<span
21+
style="color: #808080;"
22+
>This is an automated message please do not reply.</span>
23+
</p>
24+
</field>
25+
</record>
26+
</odoo>

base_export_async/i18n/da.po

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * base_export_async
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 12.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"PO-Revision-Date: 2021-02-07 17:45+0000\n"
10+
"Last-Translator: Hans Henrik Gabelgaard <hhg@gabelgaard.org>\n"
11+
"Language-Team: none\n"
12+
"Language: da\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
17+
"X-Generator: Weblate 4.3.2\n"
18+
19+
#. module: base_export_async
20+
#. odoo-javascript
21+
#: code:addons/base_export_async/static/src/xml/base.xml:0
22+
#, python-format
23+
msgid "(You will receive the export by email)"
24+
msgstr "(Du vil modtage eksporten via mail)"
25+
26+
#. module: base_export_async
27+
#: model:mail.template,body_html:base_export_async.delay_export_mail_template
28+
msgid ""
29+
"<p>Your export is available <a t-attf-href=\"{{ object.url }}\" target="
30+
"\"_blank\">here</a>.</p>\n"
31+
" <p>It will be automatically deleted the <t t-out=\"object."
32+
"expiration_date\"></t>.</p>\n"
33+
" <br>\n"
34+
" <p>\n"
35+
" <span style=\"color: #808080;\">This is an automated message "
36+
"please do not reply.</span>\n"
37+
" </p>\n"
38+
" "
39+
msgstr ""
40+
41+
#. module: base_export_async
42+
#: model:ir.model,name:base_export_async.model_delay_export
43+
msgid "Asynchronous Export"
44+
msgstr "Asynkron export"
45+
46+
#. module: base_export_async
47+
#. odoo-javascript
48+
#: code:addons/base_export_async/static/src/xml/base.xml:0
49+
#, python-format
50+
msgid "Asynchronous export"
51+
msgstr "Asynkron export"
52+
53+
#. module: base_export_async
54+
#: model:ir.model.fields,field_description:base_export_async.field_delay_export__create_uid
55+
msgid "Created by"
56+
msgstr "Oprettet af"
57+
58+
#. module: base_export_async
59+
#: model:ir.model.fields,field_description:base_export_async.field_delay_export__create_date
60+
msgid "Created on"
61+
msgstr "Oprettet den"
62+
63+
#. module: base_export_async
64+
#: model:mail.template,name:base_export_async.delay_export_mail_template
65+
msgid "Delay Export"
66+
msgstr ""
67+
68+
#. module: base_export_async
69+
#: model:ir.actions.server,name:base_export_async.to_delete_attachment_ir_actions_server
70+
#: model:ir.cron,cron_name:base_export_async.to_delete_attachment
71+
msgid "Delete Generated Exports"
72+
msgstr "Slet genererede eksporter"
73+
74+
#. module: base_export_async
75+
#: model:ir.model.fields,field_description:base_export_async.field_delay_export__display_name
76+
msgid "Display Name"
77+
msgstr "Vist navn"
78+
79+
#. module: base_export_async
80+
#: model:ir.model.fields,field_description:base_export_async.field_delay_export__expiration_date
81+
msgid "Expiration Date"
82+
msgstr ""
83+
84+
#. module: base_export_async
85+
#: model:mail.template,subject:base_export_async.delay_export_mail_template
86+
msgid "Export {{ object.model_description }} {{ datetime.date.today() }}"
87+
msgstr ""
88+
89+
#. module: base_export_async
90+
#. odoo-javascript
91+
#: code:addons/base_export_async/static/src/js/list_controller.esm.js:0
92+
#, python-format
93+
msgid "External ID"
94+
msgstr "External ID"
95+
96+
#. module: base_export_async
97+
#: model:ir.model.fields,field_description:base_export_async.field_delay_export__id
98+
msgid "ID"
99+
msgstr "ID"
100+
101+
#. module: base_export_async
102+
#: model:ir.model.fields,field_description:base_export_async.field_delay_export____last_update
103+
msgid "Last Modified on"
104+
msgstr "Senest rettet den"
105+
106+
#. module: base_export_async
107+
#: model:ir.model.fields,field_description:base_export_async.field_delay_export__write_uid
108+
msgid "Last Updated by"
109+
msgstr "Senest rettet af"
110+
111+
#. module: base_export_async
112+
#: model:ir.model.fields,field_description:base_export_async.field_delay_export__write_date
113+
msgid "Last Updated on"
114+
msgstr "Senest rettet den"
115+
116+
#. module: base_export_async
117+
#: model:ir.model.fields,field_description:base_export_async.field_delay_export__model_description
118+
msgid "Model Description"
119+
msgstr ""
120+
121+
#. module: base_export_async
122+
#. odoo-javascript
123+
#: code:addons/base_export_async/static/src/js/data_export.esm.js:0
124+
#, python-format
125+
msgid "Please select fields to save export list..."
126+
msgstr ""
127+
128+
#. module: base_export_async
129+
#: model:ir.model.fields,field_description:base_export_async.field_delay_export__url
130+
msgid "Url"
131+
msgstr ""
132+
133+
#. module: base_export_async
134+
#: model:ir.model.fields,field_description:base_export_async.field_delay_export__user_ids
135+
msgid "Users"
136+
msgstr "Brugere"
137+
138+
#. module: base_export_async
139+
#. odoo-python
140+
#: code:addons/base_export_async/models/delay_export.py:0
141+
#, python-format
142+
msgid "You must set an email address to your user."
143+
msgstr "Du skal have en email adresse på dit brugeropsæt."
144+
145+
#. module: base_export_async
146+
#. odoo-javascript
147+
#: code:addons/base_export_async/static/src/js/list_controller.esm.js:0
148+
#, python-format
149+
msgid "You will receive the export file by email as soon as it is finished."
150+
msgstr "Du vil modtage et link til eksporten så snart den er færdig."
151+
152+
#, python-format
153+
#~ msgid "Please select fields to export..."
154+
#~ msgstr "Vælg venligst felter til eksporten..."
155+
156+
#, python-format
157+
#~ msgid ""
158+
#~ "\n"
159+
#~ " <p>Your export is available <a href=\"{}\">here</a>.</p>\n"
160+
#~ " <p>It will be automatically deleted the {}.</p>\n"
161+
#~ " <p>&nbsp;</p>\n"
162+
#~ " <p><span style=\"color: #808080;\">\n"
163+
#~ " This is an automated message please do not reply.\n"
164+
#~ " </span></p>\n"
165+
#~ " "
166+
#~ msgstr ""
167+
#~ "\n"
168+
#~ " <p>Din export er tilgængelig <a href=\"{}\">her</a>.</p>\n"
169+
#~ " <p>Den vil atutomatisk blive slettet den {}.</p>\n"
170+
#~ " <p>&nbsp;</p>\n"
171+
#~ " <p><span style=\"color: #808080;\">\n"
172+
#~ " Dette er en automatisk besked. Undlad venlisgt at "
173+
#~ "besvare.\n"
174+
#~ " </span></p>\n"
175+
#~ " "
176+
177+
#, python-format
178+
#~ msgid "Export {} {}"
179+
#~ msgstr "Eksport {} {}"

0 commit comments

Comments
 (0)