Skip to content

Commit

Permalink
Merge PR #772 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by bguillot
  • Loading branch information
OCA-git-bot committed Sep 25, 2023
2 parents 8ec7352 + 8023625 commit 0cff6bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion sql_export_mail/models/sql_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ class SqlExport(models.Model):
"need to link the sql query with a cron to send mail automatically",
)
cron_ids = fields.Many2many(
"ir.cron", "cron_sqlquery_rel", "sql_id", "cron_id", "Crons"
"ir.cron",
"cron_sqlquery_rel",
"sql_id",
"cron_id",
"Crons",
groups="base.group_system",
)
# We could implement other conditions, that is why it is a selection field
mail_condition = fields.Selection(
Expand Down
3 changes: 2 additions & 1 deletion sql_export_mail/views/sql_export_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<field
name="mail_condition"
attrs="{'invisible': [('cron_ids', '=', [(6, False, [])])]}"
groups="base.group_system"
/>
</field>
<page name="page_sql" position="after">
Expand All @@ -30,7 +31,7 @@
colspan="2"
/>
</group>
<group string="Crons">
<group string="Crons" groups="base.group_system">
<field
name="cron_ids"
nolabel="1"
Expand Down

0 comments on commit 0cff6bf

Please sign in to comment.