Skip to content

Commit

Permalink
[FIX] bi_sql_editor : prevent to raise an error when creating a cron …
Browse files Browse the repository at this point in the history
…for a materialized view, if it is the last of the month.
  • Loading branch information
legalsylvain committed May 31, 2024
1 parent 9a0f99f commit c1865a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bi_sql_editor/models/bi_sql_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

import logging
from datetime import datetime
from datetime import datetime, timedelta
from psycopg2 import ProgrammingError

from odoo import _, api, fields, models, SUPERUSER_ID
Expand Down Expand Up @@ -402,7 +402,7 @@ def _prepare_cron(self):
'numbercall': -1,
'interval_number': 1,
'interval_type': 'days',
'nextcall': datetime(now.year, now.month, now.day+1),
"nextcall": now + timedelta(days=1),
'active': True,
}

Expand Down

0 comments on commit c1865a4

Please sign in to comment.