Florian da Costa
6 years ago
6 changed files with 39 additions and 56 deletions
-
16sql_export_mail/__manifest__.py
-
26sql_export_mail/mail_template.xml
-
30sql_export_mail/models/sql_export.py
-
1sql_export_mail/tests/__init__.py
-
16sql_export_mail/tests/test_sql_query_mail.py
-
6sql_export_mail/views/sql_export_view.xml
@ -1,22 +1,20 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright 2019 Akretion |
|||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
|||
|
|||
{ |
|||
'name': 'SQL Export Mail', |
|||
'version': '9.0.1.0.0', |
|||
'author': 'Akretion,Odoo Community Association (OCA)', |
|||
'website': 'http://github/oca/server-tools', |
|||
'license': 'AGPL-3', |
|||
'category': 'Generic Modules/Others', |
|||
'version': '12.0.1.0.0', |
|||
'category': 'Generic Modules', |
|||
'summary': 'Send csv file generated by sql query by mail.', |
|||
'author': |
|||
"Akretion, Odoo Community Association (OCA)", |
|||
'website': 'https://github.com/OCA/server-tools', |
|||
'depends': [ |
|||
'sql_export', |
|||
'mail', |
|||
], |
|||
'license': 'AGPL-3', |
|||
'data': [ |
|||
'views/sql_export_view.xml', |
|||
'mail_template.xml', |
|||
], |
|||
'installable': True, |
|||
} |
|||
} |
@ -1,24 +1,22 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
|
|||
<odoo> |
|||
<data noupdate="1"> |
|||
<odoo noupdate="1"> |
|||
|
|||
<!-- Error Email template --> |
|||
<record id="sql_export_mailer" model="mail.template"> |
|||
<field name="name">SQL Export</field> |
|||
<field name="email_from">admin@example.com</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[ |
|||
<!-- Error Email template --> |
|||
<record id="sql_export_mailer" model="mail.template"> |
|||
<field name="name">SQL Export</field> |
|||
<field name="email_from">admin@example.com</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> |
|||
]]></field> |
|||
</record> |
|||
|
|||
</data> |
|||
</odoo> |
@ -1,2 +1 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from . import test_sql_query_mail |
Write
Preview
Loading…
Cancel
Save
Reference in new issue