Skip to content

Commit 6bc8eaf

Browse files
committed
Merge PR #860 into 15.0
Signed-off-by legalsylvain
2 parents a335db8 + 0cf07fe commit 6bc8eaf

20 files changed

+1322
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../sql_export_mail

setup/sql_export_mail/setup.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import setuptools
2+
3+
setuptools.setup(
4+
setup_requires=['setuptools-odoo'],
5+
odoo_addon=True,
6+
)

sql_export_mail/README.rst

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
===============
2+
SQL Export Mail
3+
===============
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:e07d45bf05ba7798ba09b99f0a16c60cf70c98dc1819c149bedee8461343721e
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%2Freporting--engine-lightgray.png?logo=github
20+
:target: https://github.com/OCA/reporting-engine/tree/15.0/sql_export_mail
21+
:alt: OCA/reporting-engine
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/reporting-engine-15-0/reporting-engine-15-0-sql_export_mail
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/reporting-engine&target_branch=15.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
Allow to send the result of a query (made with the module sql_export) by mail.
32+
33+
**Table of contents**
34+
35+
.. contents::
36+
:local:
37+
38+
Configuration
39+
=============
40+
41+
To configure this module, you need to:
42+
43+
#. Go to the sql query for which you want users to be notified by e-mail.
44+
#. Add users to be notified in the field Users Notified by e-mail.
45+
#. Click on the button create a cron and then configure the cron to run when
46+
you want to. If you already have created a cron for another query, you can
47+
use it again for other queries
48+
49+
Bug Tracker
50+
===========
51+
52+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/issues>`_.
53+
In case of trouble, please check there if your issue has already been reported.
54+
If you spotted it first, help us to smash it by providing a detailed and welcomed
55+
`feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20sql_export_mail%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
56+
57+
Do not contact contributors directly about support or help with technical issues.
58+
59+
Credits
60+
=======
61+
62+
Authors
63+
~~~~~~~
64+
65+
* Akretion
66+
* GRAP
67+
68+
Contributors
69+
~~~~~~~~~~~~
70+
71+
* Florian da Costa <florian.dacosta@akretion.com>
72+
* Helly kapatel <helly.kapatel@initos.com>
73+
* Solange Steiner <solange.steiner@braintec.com>
74+
75+
Maintainers
76+
~~~~~~~~~~~
77+
78+
This module is maintained by the OCA.
79+
80+
.. image:: https://odoo-community.org/logo.png
81+
:alt: Odoo Community Association
82+
:target: https://odoo-community.org
83+
84+
OCA, or the Odoo Community Association, is a nonprofit organization whose
85+
mission is to support the collaborative development of Odoo features and
86+
promote its widespread use.
87+
88+
.. |maintainer-legalsylvain| image:: https://github.com/legalsylvain.png?size=40px
89+
:target: https://github.com/legalsylvain
90+
:alt: legalsylvain
91+
92+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
93+
94+
|maintainer-legalsylvain|
95+
96+
This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/15.0/sql_export_mail>`_ project on GitHub.
97+
98+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

sql_export_mail/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models

sql_export_mail/__manifest__.py

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
2+
{
3+
"name": "SQL Export Mail",
4+
"version": "15.0.1.0.0",
5+
"category": "Generic Modules",
6+
"summary": "Send csv file generated by sql query by mail.",
7+
"author": "Akretion,GRAP,Odoo Community Association (OCA)",
8+
"maintainers": ["legalsylvain"],
9+
"website": "https://github.com/OCA/reporting-engine",
10+
"depends": [
11+
"mail",
12+
"sql_export",
13+
],
14+
"license": "AGPL-3",
15+
"data": [
16+
"views/sql_export_view.xml",
17+
"data/mail_template.xml",
18+
],
19+
"installable": True,
20+
}
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<odoo noupdate="1">
3+
4+
<!-- Error Email template -->
5+
<record id="sql_export_mailer" model="mail.template">
6+
<field name="name">SQL Export</field>
7+
<field name="email_from">admin@example.com</field>
8+
<field name="email_to">{{object.get_email_address_for_template()}}</field>
9+
<field name="subject">{{object.name or ''}}</field>
10+
<field name="model_id" ref="sql_export.model_sql_export" />
11+
<field name="auto_delete" eval="True" />
12+
<field name="body_html" type="html">
13+
<div
14+
style="font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; "
15+
>
16+
17+
<p>You will find the report <t
18+
t-out="object.name or ''"
19+
/> as an attachment of the mail.</p>
20+
21+
</div>
22+
</field>
23+
</record>
24+
25+
</odoo>

sql_export_mail/i18n/ca.po

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * sql_export_mail
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 14.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"Last-Translator: Automatically generated\n"
10+
"Language-Team: none\n"
11+
"Language: ca\n"
12+
"MIME-Version: 1.0\n"
13+
"Content-Type: text/plain; charset=UTF-8\n"
14+
"Content-Transfer-Encoding: \n"
15+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
16+
17+
#. module: sql_export_mail
18+
#: model:mail.template,body_html:sql_export_mail.sql_export_mailer
19+
msgid ""
20+
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-"
21+
"serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
22+
"\n"
23+
" <p>You will find the report <t t-out=\"object.name or ''\"></t> as an "
24+
"attachment of the mail.</p>\n"
25+
"\n"
26+
"</div>\n"
27+
" "
28+
msgstr ""
29+
30+
#. module: sql_export_mail
31+
#: model:ir.model.fields,help:sql_export_mail.field_sql_export__mail_user_ids
32+
msgid ""
33+
"Add the users who want to receive the report by e-mail. You need to link the "
34+
"sql query with a cron to send mail automatically"
35+
msgstr ""
36+
37+
#. module: sql_export_mail
38+
#: model_terms:ir.ui.view,arch_db:sql_export_mail.sql_export_mail_view_form
39+
msgid "Create Cron"
40+
msgstr ""
41+
42+
#. module: sql_export_mail
43+
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export__cron_ids
44+
#: model_terms:ir.ui.view,arch_db:sql_export_mail.sql_export_mail_view_form
45+
msgid "Crons"
46+
msgstr ""
47+
48+
#. module: sql_export_mail
49+
#: model:ir.model.fields.selection,name:sql_export_mail.selection__sql_export__mail_condition__not_empty
50+
msgid "File Not Empty"
51+
msgstr ""
52+
53+
#. module: sql_export_mail
54+
#. odoo-python
55+
#: code:addons/sql_export_mail/models/sql_export.py:0
56+
#, python-format
57+
msgid ""
58+
"It is not possible to execute and send a query automatically by mail if "
59+
"there are parameters to fill"
60+
msgstr ""
61+
62+
#. module: sql_export_mail
63+
#: model_terms:ir.ui.view,arch_db:sql_export_mail.sql_export_mail_view_form
64+
msgid "Mail"
65+
msgstr ""
66+
67+
#. module: sql_export_mail
68+
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export__mail_condition
69+
msgid "Mail Condition"
70+
msgstr ""
71+
72+
#. module: sql_export_mail
73+
#: model:mail.template,name:sql_export_mail.sql_export_mailer
74+
msgid "SQL Export"
75+
msgstr ""
76+
77+
#. module: sql_export_mail
78+
#: model:ir.model,name:sql_export_mail.model_sql_export
79+
msgid "SQL export"
80+
msgstr ""
81+
82+
#. module: sql_export_mail
83+
#. odoo-python
84+
#: code:addons/sql_export_mail/models/sql_export.py:0
85+
#, python-format
86+
msgid "The user does not have any e-mail address."
87+
msgstr ""
88+
89+
#. module: sql_export_mail
90+
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export__mail_user_ids
91+
msgid "User to notify"
92+
msgstr ""
93+
94+
#. module: sql_export_mail
95+
#: model_terms:ir.ui.view,arch_db:sql_export_mail.sql_export_mail_view_form
96+
msgid "Users Notified by e-mail"
97+
msgstr ""
98+
99+
#. module: sql_export_mail
100+
#: model:mail.template,subject:sql_export_mail.sql_export_mailer
101+
msgid "{{object.name or ''}}"
102+
msgstr ""

sql_export_mail/i18n/fr.po

+136
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * sql_export_mail
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 8.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"POT-Creation-Date: 2017-07-18 13:15+0000\n"
10+
"PO-Revision-Date: 2017-07-18 13:15+0000\n"
11+
"Last-Translator: <>\n"
12+
"Language-Team: \n"
13+
"Language: \n"
14+
"MIME-Version: 1.0\n"
15+
"Content-Type: text/plain; charset=UTF-8\n"
16+
"Content-Transfer-Encoding: \n"
17+
"Plural-Forms: \n"
18+
19+
#. module: sql_export_mail
20+
#: model:mail.template,body_html:sql_export_mail.sql_export_mailer
21+
msgid ""
22+
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-"
23+
"serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
24+
"\n"
25+
" <p>You will find the report <t t-out=\"object.name or ''\"></t> as an "
26+
"attachment of the mail.</p>\n"
27+
"\n"
28+
"</div>\n"
29+
" "
30+
msgstr ""
31+
32+
#. module: sql_export_mail
33+
#: model:ir.model.fields,help:sql_export_mail.field_sql_export__mail_user_ids
34+
msgid ""
35+
"Add the users who want to receive the report by e-mail. You need to link the "
36+
"sql query with a cron to send mail automatically"
37+
msgstr ""
38+
"Ajoutez les utilisateurs voulant recevoir le rapport par mail. Vous devez "
39+
"ensuite créer une tâche planifiée pour envoyer le mail automatiquement."
40+
41+
#. module: sql_export_mail
42+
#: model_terms:ir.ui.view,arch_db:sql_export_mail.sql_export_mail_view_form
43+
msgid "Create Cron"
44+
msgstr "Créer une tâche planfiée"
45+
46+
#. module: sql_export_mail
47+
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export__cron_ids
48+
#: model_terms:ir.ui.view,arch_db:sql_export_mail.sql_export_mail_view_form
49+
msgid "Crons"
50+
msgstr "Tâches planifiées"
51+
52+
#. module: sql_export_mail
53+
#: model:ir.model.fields.selection,name:sql_export_mail.selection__sql_export__mail_condition__not_empty
54+
msgid "File Not Empty"
55+
msgstr "Fichier non vide."
56+
57+
#. module: sql_export_mail
58+
#. odoo-python
59+
#: code:addons/sql_export_mail/models/sql_export.py:0
60+
#, python-format
61+
msgid ""
62+
"It is not possible to execute and send a query automatically by mail if "
63+
"there are parameters to fill"
64+
msgstr ""
65+
"Il n'est pas possible d'exécuter en envoyer le résultat d'une requête par "
66+
"mail si celle-ci contient des paramètres."
67+
68+
#. module: sql_export_mail
69+
#: model_terms:ir.ui.view,arch_db:sql_export_mail.sql_export_mail_view_form
70+
msgid "Mail"
71+
msgstr ""
72+
73+
#. module: sql_export_mail
74+
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export__mail_condition
75+
#, fuzzy
76+
msgid "Mail Condition"
77+
msgstr "Condition d'envoi par mail"
78+
79+
#. module: sql_export_mail
80+
#: model:mail.template,name:sql_export_mail.sql_export_mailer
81+
msgid "SQL Export"
82+
msgstr ""
83+
84+
#. module: sql_export_mail
85+
#: model:ir.model,name:sql_export_mail.model_sql_export
86+
msgid "SQL export"
87+
msgstr "Export SQL"
88+
89+
#. module: sql_export_mail
90+
#. odoo-python
91+
#: code:addons/sql_export_mail/models/sql_export.py:0
92+
#, python-format
93+
msgid "The user does not have any e-mail address."
94+
msgstr "L'utilisateur selectionné n'a pas d'addresse mail."
95+
96+
#. module: sql_export_mail
97+
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export__mail_user_ids
98+
msgid "User to notify"
99+
msgstr "Utilisateurs à notifier par mail"
100+
101+
#. module: sql_export_mail
102+
#: model_terms:ir.ui.view,arch_db:sql_export_mail.sql_export_mail_view_form
103+
msgid "Users Notified by e-mail"
104+
msgstr "Utilisateurs notifiés par mail"
105+
106+
#. module: sql_export_mail
107+
#: model:mail.template,subject:sql_export_mail.sql_export_mailer
108+
msgid "{{object.name or ''}}"
109+
msgstr ""
110+
111+
#, fuzzy
112+
#~ msgid ""
113+
#~ "\n"
114+
#~ "<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-"
115+
#~ "serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; "
116+
#~ "\">\n"
117+
#~ "\n"
118+
#~ "<p>You will find the report ${object.name or ''} as an attachment of the "
119+
#~ "mail.</p>\n"
120+
#~ "\n"
121+
#~ "</div>\n"
122+
#~ " "
123+
#~ msgstr ""
124+
#~ "\n"
125+
#~ "<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-"
126+
#~ "serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; "
127+
#~ "\">\n"
128+
#~ "\n"
129+
#~ "<p>Vous trouverez le rapport ${object.name or ''} en pièce jointe de ce "
130+
#~ "mail.</p>\n"
131+
#~ "\n"
132+
#~ "</div>\n"
133+
#~ " "
134+
135+
#~ msgid "${object.name or ''}"
136+
#~ msgstr "${object.name or ''}"

0 commit comments

Comments
 (0)