Skip to content

Commit

Permalink
[16.0][FIX][bi_sql_editor] unlink bi_sql_view without cron
Browse files Browse the repository at this point in the history
Forward port of OCA#811
  • Loading branch information
leemannd authored and sanderlienaerts committed Aug 13, 2024
1 parent 01b928c commit 43d95af
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bi_sql_editor/models/bi_sql_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ class BiSQLView(models.Model):
comodel_name="ir.cron",
readonly=True,
help="Cron Task that will refresh the materialized view",
ondelete="cascade",
)

rule_id = fields.Many2one(string="Odoo Rule", comodel_name="ir.rule", readonly=True)
Expand Down Expand Up @@ -263,8 +264,6 @@ def unlink(self):
"If you want to delete them, first set them to draft."
)
)
if self.cron_id:
self.cron_id.unlink()
return super().unlink()

def copy(self, default=None):
Expand Down

0 comments on commit 43d95af

Please sign in to comment.