forked from OCA/reporting-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d5a95d8
commit 92f4ea0
Showing
14 changed files
with
672 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | ||
:alt: License: AGPL-3 | ||
|
||
SQL Export Mail | ||
=============== | ||
|
||
Allow to send the result of a query (made with the module sql_export) by mail. | ||
|
||
|
||
Configuration | ||
============= | ||
|
||
To configure this module, you need to: | ||
|
||
#. Go to the sql query for which you want users to be notified by e-mail. | ||
#. Add users to be notified in the field Users Notified by e-mail. | ||
#. Click on the button create a cron and then configure the cron to run when | ||
you want to. If you already have created a cron for another query, you can | ||
use it again for other queries | ||
|
||
Usage | ||
===== | ||
|
||
To use this module, you need to: | ||
|
||
#. Go to ... | ||
|
||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/149/10.0 | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/OCA/server-tools/issues>`_. In case of trouble, please | ||
check there if your issue has already been reported. If you spotted it first, | ||
help us smash it by providing detailed and welcomed feedback. | ||
|
||
Credits | ||
======= | ||
|
||
Images | ||
------ | ||
|
||
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_. | ||
|
||
Contributors | ||
------------ | ||
|
||
* Florian da Costa <[email protected]> | ||
|
||
Maintainer | ||
---------- | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
This module is maintained by the OCA. | ||
|
||
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 file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# -*- coding: utf-8 -*- | ||
############################################################################## | ||
# | ||
# OpenERP, Open Source Management Solution | ||
# Copyright (C) 2015 Akretion (<http://www.akretion.com>). | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License as | ||
# published by the Free Software Foundation, either version 3 of the | ||
# License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
############################################################################## | ||
|
||
{ | ||
'name': 'SQL Export Mail', | ||
'version': '8.0.1.0.0', | ||
'author': 'Akretion,Odoo Community Association (OCA)', | ||
'website': 'http://www.akretion.com', | ||
'license': 'AGPL-3', | ||
'category': 'Generic Modules/Others', | ||
'summary': 'Export data in csv file with SQL requests', | ||
'depends': [ | ||
'sql_export', | ||
'mail', | ||
], | ||
'data': [ | ||
'views/sql_export_view.xml', | ||
'mail_template.xml', | ||
], | ||
'installable': True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * sql_export_mail | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 8.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2017-07-18 13:15+0000\n" | ||
"PO-Revision-Date: 2017-07-18 13:15+0000\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: sql_export_mail | ||
#: model:email.template,body_html:sql_export_mail.sql_export_mailer | ||
msgid "\n" | ||
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n" | ||
"\n" | ||
"<p>You will find the report ${object.name or ''} as an attachment of the mail.</p>\n" | ||
"\n" | ||
"</div>\n" | ||
" " | ||
msgstr "\n" | ||
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n" | ||
"\n" | ||
"<p>Vous trouverez le rapport ${object.name or ''} en pièce jointe de ce mail.</p>\n" | ||
"\n" | ||
"</div>\n" | ||
" " | ||
|
||
#. module: sql_export_mail | ||
#: model:email.template,subject:sql_export_mail.sql_export_mailer | ||
msgid "${object.name or ''}" | ||
msgstr "${object.name or ''}" | ||
|
||
#. module: sql_export_mail | ||
#: help:sql.export,mail_user_ids:0 | ||
msgid "Add the users who want to receive the report by e-mail. You need to link the sql query with a cron to send mail automatically" | ||
msgstr "Ajoutez les utilisateurs voulant recevoir le rapport par mail. Vous devez ensuite créer une tâche planifiée pour envoyer le mail automatiquement." | ||
|
||
#. module: sql_export_mail | ||
#: view:sql.export:sql_export_mail.sql_export_mail_view_form | ||
msgid "Create Cron" | ||
msgstr "Créer une tâche planfiée" | ||
|
||
#. module: sql_export_mail | ||
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export_cron_ids | ||
#: view:sql.export:sql_export_mail.sql_export_mail_view_form | ||
#: field:sql.export,cron_ids:0 | ||
msgid "Crons" | ||
msgstr "Tâches planifiées" | ||
|
||
#. module: sql_export_mail | ||
#: selection:sql.export,mail_condition:0 | ||
msgid "File Not Empty" | ||
msgstr "Fichier non vide." | ||
|
||
#. module: sql_export_mail | ||
#: code:addons/sql_export_mail/models/sql_export.py:126 | ||
#, python-format | ||
msgid "It is not possible to execute and send a query automatically by e-mail if there are parameters to fill" | ||
msgstr "Il n'est pas possible d'exécuter en envoyer le résultat d'une requête par mail si celle-ci contient des paramètres." | ||
|
||
#. module: sql_export_mail | ||
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export_mail_condition | ||
#: field:sql.export,mail_condition:0 | ||
msgid "Mail condition" | ||
msgstr "Condition d'envoi par mail" | ||
|
||
#. module: sql_export_mail | ||
#: model:ir.model,name:sql_export_mail.model_sql_export | ||
msgid "SQL export" | ||
msgstr "Export SQL" | ||
|
||
#. module: sql_export_mail | ||
#: code:addons/sql_export_mail/models/sql_export.py:135 | ||
#, python-format | ||
msgid "The user does not have any e-mail address." | ||
msgstr "L'utilisateur selectionné n'a pas d'addresse mail." | ||
|
||
#. module: sql_export_mail | ||
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export_mail_user_ids | ||
#: field:sql.export,mail_user_ids:0 | ||
msgid "User to notify" | ||
msgstr "Utilisateurs à notifier par mail" | ||
|
||
#. module: sql_export_mail | ||
#: view:sql.export:sql_export_mail.sql_export_mail_view_form | ||
msgid "Users Notified by e-mail" | ||
msgstr "Utilisateurs notifiés par mail" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * sql_export_mail | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 8.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2017-07-18 13:24+0000\n" | ||
"PO-Revision-Date: 2017-07-18 13:24+0000\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: sql_export_mail | ||
#: model:email.template,body_html:sql_export_mail.sql_export_mailer | ||
msgid "\n" | ||
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n" | ||
"\n" | ||
"<p>You will find the report ${object.name or ''} as an attachment of the mail.</p>\n" | ||
"\n" | ||
"</div>\n" | ||
" " | ||
msgstr "" | ||
|
||
#. module: sql_export_mail | ||
#: model:email.template,subject:sql_export_mail.sql_export_mailer | ||
msgid "${object.name or ''}" | ||
msgstr "" | ||
|
||
#. module: sql_export_mail | ||
#: help:sql.export,mail_user_ids:0 | ||
msgid "Add the users who want to receive the report by e-mail. You need to link the sql query with a cron to send mail automatically" | ||
msgstr "" | ||
|
||
#. module: sql_export_mail | ||
#: view:sql.export:sql_export_mail.sql_export_mail_view_form | ||
msgid "Create Cron" | ||
msgstr "" | ||
|
||
#. module: sql_export_mail | ||
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export_cron_ids | ||
#: view:sql.export:sql_export_mail.sql_export_mail_view_form | ||
#: field:sql.export,cron_ids:0 | ||
msgid "Crons" | ||
msgstr "" | ||
|
||
#. module: sql_export_mail | ||
#: selection:sql.export,mail_condition:0 | ||
msgid "File Not Empty" | ||
msgstr "" | ||
|
||
#. module: sql_export_mail | ||
#: code:addons/sql_export_mail/models/sql_export.py:126 | ||
#, python-format | ||
msgid "It is not possible to execute and send a query automatically by e-mail if there are parameters to fill" | ||
msgstr "" | ||
|
||
#. module: sql_export_mail | ||
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export_mail_condition | ||
#: field:sql.export,mail_condition:0 | ||
msgid "Mail condition" | ||
msgstr "" | ||
|
||
#. module: sql_export_mail | ||
#: model:ir.model,name:sql_export_mail.model_sql_export | ||
msgid "SQL export" | ||
msgstr "" | ||
|
||
#. module: sql_export_mail | ||
#: code:addons/sql_export_mail/models/sql_export.py:135 | ||
#, python-format | ||
msgid "The user does not have any e-mail address." | ||
msgstr "" | ||
|
||
#. module: sql_export_mail | ||
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export_mail_user_ids | ||
#: field:sql.export,mail_user_ids:0 | ||
msgid "User to notify" | ||
msgstr "" | ||
|
||
#. module: sql_export_mail | ||
#: view:sql.export:sql_export_mail.sql_export_mail_view_form | ||
msgid "Users Notified by e-mail" | ||
msgstr "" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
Copyright (C) 2017 Akretion (http://www.akretion.com/) | ||
The licence is in the file __openerp__.py | ||
--> | ||
|
||
<openerp> | ||
<data noupdate="1"> | ||
|
||
<!-- Error Email template --> | ||
<record id="sql_export_mailer" model="email.template"> | ||
<field name="name">SQL Export</field> | ||
<field name="email_from">[email protected]</field> | ||
<field name="email_to">${object.get_email_address_for_template()}</field> | ||
<field name="subject">${object.name or ''}</field> | ||
<field name="model_id" ref="sql_export.model_sql_export"/> | ||
<field name="auto_delete" eval="True"/> | ||
<field name="body_html"><![CDATA[ | ||
<div style="font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; "> | ||
<p>You will find the report ${object.name or ''} as an attachment of the mail.</p> | ||
</div> | ||
]]></field> | ||
</record> | ||
|
||
</data> | ||
</openerp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import sql_export |
Oops, something went wrong.