Skip to content

Commit 110c282

Browse files
[MIG] sql_export_mail: Migration to 17.0
1 parent 2a350ae commit 110c282

File tree

8 files changed

+12
-39
lines changed

8 files changed

+12
-39
lines changed

sql_export_mail/README.rst

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ Contributors
7272

7373
- Florian da Costa <[email protected]>
7474
- Helly kapatel <[email protected]>
75+
- Sander Lienaerts <[email protected]>
7576

7677
Maintainers
7778
-----------

sql_export_mail/__manifest__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
22
{
33
"name": "SQL Export Mail",
4-
"version": "16.0.2.0.0",
4+
"version": "17.0.1.0.0",
55
"category": "Generic Modules",
66
"summary": "Send csv file generated by sql query by mail.",
77
"author": "Akretion,GRAP,Odoo Community Association (OCA)",

sql_export_mail/migrations/16.0.1.0.0/noupdate_changes.xml

-19
This file was deleted.

sql_export_mail/migrations/16.0.1.0.0/post-migration.py

-8
This file was deleted.
+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
- Florian da Costa \<<[email protected]>\>
22
- Helly kapatel \<<[email protected]>\>
3+
- Sander Lienaerts \<<[email protected]>\>

sql_export_mail/static/description/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
419419
<ul class="simple">
420420
<li>Florian da Costa &lt;<a class="reference external" href="mailto:florian.dacosta&#64;akretion.com">florian.dacosta&#64;akretion.com</a>&gt;</li>
421421
<li>Helly kapatel &lt;<a class="reference external" href="mailto:helly.kapatel&#64;initos.com">helly.kapatel&#64;initos.com</a>&gt;</li>
422+
<li>Sander Lienaerts &lt;<a class="reference external" href="mailto:sander.lienaerts&#64;codeforward.nl">sander.lienaerts&#64;codeforward.nl</a>&gt;</li>
422423
</ul>
423424
</div>
424425
<div class="section" id="maintainers">

sql_export_mail/tests/test_sql_query_mail.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
# @author: Florian da Costa
33
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
44

5-
from odoo import SUPERUSER_ID
5+
from odoo import SUPERUSER_ID, Command
66
from odoo.tests.common import TransactionCase
77

88

99
class TestExportSqlQueryMail(TransactionCase):
10-
def setUp(self):
11-
super(TestExportSqlQueryMail, self).setUp()
12-
self.sql_report_demo = self.env.ref("sql_export.sql_export_partner")
13-
self.sql_report_demo.write({"mail_user_ids": [(4, SUPERUSER_ID)]})
10+
@classmethod
11+
def setUpClass(cls):
12+
super().setUpClass()
13+
cls.sql_report_demo = cls.env.ref("sql_export.sql_export_partner")
14+
cls.sql_report_demo.mail_user_ids = [Command.link(SUPERUSER_ID)]
1415

1516
def test_sql_query_mail(self):
1617
mail_obj = self.env["mail.mail"]

sql_export_mail/views/sql_export_view.xml

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<odoo>
3-
4-
53
<record id="sql_export_mail_view_form" model="ir.ui.view">
64
<field name="model">sql.export</field>
75
<field name="inherit_id" ref="sql_export.sql_export_view_form" />
@@ -11,13 +9,13 @@
119
name="create_cron"
1210
string="Create Cron"
1311
type="object"
14-
attrs="{'invisible': ['|', ('state', '=', 'draft'), ('mail_user_ids', '=', [(6, False, [])])]}"
12+
invisible="state == 'draft' or not mail_user_ids"
1513
/>
1614
</button>
1715
<field name="copy_options" position="after">
1816
<field
1917
name="mail_condition"
20-
attrs="{'invisible': [('cron_ids', '=', [(6, False, [])])]}"
18+
invisible="not cron_ids"
2119
groups="base.group_system"
2220
/>
2321
</field>
@@ -39,10 +37,8 @@
3937
domain="[('model_id', '=', 'sql.export')]"
4038
/>
4139
</group>
42-
4340
</page>
4441
</page>
4542
</field>
4643
</record>
47-
4844
</odoo>

0 commit comments

Comments
 (0)