mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[FIX][bi_sql_editor] unlink bi_sql_view without cron
It wasn't possible to unlink him. A fix has been done in 16.0: https://github.com/OCA/reporting-engine/pull/770 But letting the ORM handling him doesn't require the line of code
This commit is contained in:
@@ -158,6 +158,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)
|
||||
@@ -259,7 +260,6 @@ class BiSQLView(models.Model):
|
||||
"If you want to delete them, first set them to draft."
|
||||
)
|
||||
)
|
||||
self.cron_id.unlink()
|
||||
return super(BiSQLView, self).unlink()
|
||||
|
||||
def copy(self, default=None):
|
||||
|
||||
Reference in New Issue
Block a user