Skip to content

Commit

Permalink
[MIG] sql_export_mail: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderlienaerts committed Jan 15, 2024
1 parent 2a350ae commit 110c282
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 39 deletions.
1 change: 1 addition & 0 deletions sql_export_mail/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Contributors

- Florian da Costa <[email protected]>
- Helly kapatel <[email protected]>
- Sander Lienaerts <[email protected]>

Maintainers
-----------
Expand Down
2 changes: 1 addition & 1 deletion sql_export_mail/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "SQL Export Mail",
"version": "16.0.2.0.0",
"version": "17.0.1.0.0",
"category": "Generic Modules",
"summary": "Send csv file generated by sql query by mail.",
"author": "Akretion,GRAP,Odoo Community Association (OCA)",
Expand Down
19 changes: 0 additions & 19 deletions sql_export_mail/migrations/16.0.1.0.0/noupdate_changes.xml

This file was deleted.

8 changes: 0 additions & 8 deletions sql_export_mail/migrations/16.0.1.0.0/post-migration.py

This file was deleted.

1 change: 1 addition & 0 deletions sql_export_mail/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- Florian da Costa \<<[email protected]>\>
- Helly kapatel \<<[email protected]>\>
- Sander Lienaerts \<<[email protected]>\>
1 change: 1 addition & 0 deletions sql_export_mail/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<ul class="simple">
<li>Florian da Costa &lt;<a class="reference external" href="mailto:florian.dacosta&#64;akretion.com">florian.dacosta&#64;akretion.com</a>&gt;</li>
<li>Helly kapatel &lt;<a class="reference external" href="mailto:helly.kapatel&#64;initos.com">helly.kapatel&#64;initos.com</a>&gt;</li>
<li>Sander Lienaerts &lt;<a class="reference external" href="mailto:sander.lienaerts&#64;codeforward.nl">sander.lienaerts&#64;codeforward.nl</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand Down
11 changes: 6 additions & 5 deletions sql_export_mail/tests/test_sql_query_mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
# @author: Florian da Costa
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo import SUPERUSER_ID
from odoo import SUPERUSER_ID, Command
from odoo.tests.common import TransactionCase


class TestExportSqlQueryMail(TransactionCase):
def setUp(self):
super(TestExportSqlQueryMail, self).setUp()
self.sql_report_demo = self.env.ref("sql_export.sql_export_partner")
self.sql_report_demo.write({"mail_user_ids": [(4, SUPERUSER_ID)]})
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.sql_report_demo = cls.env.ref("sql_export.sql_export_partner")
cls.sql_report_demo.mail_user_ids = [Command.link(SUPERUSER_ID)]

def test_sql_query_mail(self):
mail_obj = self.env["mail.mail"]
Expand Down
8 changes: 2 additions & 6 deletions sql_export_mail/views/sql_export_view.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>


<record id="sql_export_mail_view_form" model="ir.ui.view">
<field name="model">sql.export</field>
<field name="inherit_id" ref="sql_export.sql_export_view_form" />
Expand All @@ -11,13 +9,13 @@
name="create_cron"
string="Create Cron"
type="object"
attrs="{'invisible': ['|', ('state', '=', 'draft'), ('mail_user_ids', '=', [(6, False, [])])]}"
invisible="state == 'draft' or not mail_user_ids"
/>
</button>
<field name="copy_options" position="after">
<field
name="mail_condition"
attrs="{'invisible': [('cron_ids', '=', [(6, False, [])])]}"
invisible="not cron_ids"
groups="base.group_system"
/>
</field>
Expand All @@ -39,10 +37,8 @@
domain="[('model_id', '=', 'sql.export')]"
/>
</group>

</page>
</page>
</field>
</record>

</odoo>

0 comments on commit 110c282

Please sign in to comment.