[IMP] bi_sql_editor : conserve cron settings, when setting materialized view to draft ; Set correct default values for cron and enable it

This commit is contained in:
Sylvain LE GAL
2021-06-07 12:27:07 +02:00
committed by OCA-git-bot
parent 02ca14a37f
commit 680bfdfdad
2 changed files with 23 additions and 11 deletions

View File

@@ -82,6 +82,10 @@ class TestBiSqlViewEditor(SingleTransactionCase):
with self.assertRaises(UserError):
self.view.unlink()
self.view.button_set_draft()
self.assertNotEqual(
self.view.cron_id, False, 'Set to draft materialized view should'
' not unlink cron'
)
self.view.unlink()
res = self.bi_sql_view.search([('name', '=', 'Partners View 2')])
self.assertEqual(len(res), 0, 'View not deleted')