[FIX] _transient_clean_rows_older_than() WHERE clause
parent
96221b3b26
commit
5b280fc01b
|
@ -4,7 +4,7 @@
|
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
{
|
||||
'name': 'Account Financial Reports',
|
||||
'version': '11.0.2.2.1',
|
||||
'version': '11.0.2.2.2',
|
||||
'category': 'Reporting',
|
||||
'summary': 'OCA Financial Reports',
|
||||
'author': 'Camptocamp SA,'
|
||||
|
|
|
@ -15,7 +15,7 @@ class AbstractReport(models.AbstractModel):
|
|||
query = """
|
||||
DELETE FROM """ + self._table + """
|
||||
WHERE COALESCE(
|
||||
write_date, self.create_date, (now() at time zone 'UTC'))::timestamp
|
||||
write_date, create_date, (now() at time zone 'UTC'))::timestamp
|
||||
< ((now() at time zone 'UTC') - interval %s)
|
||||
"""
|
||||
self.env.cr.execute(query, ("%s seconds" % seconds,))
|
||||
|
|
Loading…
Reference in New Issue