details: https://code.tryton.org/tryton/commit/3324ac37a76f
branch: default
user: Cédric Krier <[email protected]>
date: Sat Mar 28 19:07:51 2026 +0100
description:
Use current timestamp as last modified at for table query
The ModelSQL with table query may not define write nor create date since
5095928ec38a
diffstat:
trytond/trytond/model/modelsql.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (17 lines):
diff -r af3cd28a3347 -r 3324ac37a76f trytond/trytond/model/modelsql.py
--- a/trytond/trytond/model/modelsql.py Thu Mar 26 08:14:45 2026 +0100
+++ b/trytond/trytond/model/modelsql.py Sat Mar 28 19:07:51 2026 +0100
@@ -956,8 +956,11 @@
@classmethod
def column_last_modified_at(cls, tables):
- table, _ = tables[None]
- return Coalesce(table.write_date, table.create_date)
+ if cls._is_table_query():
+ return CurrentTimestamp()
+ else:
+ table, _ = tables[None]
+ return Coalesce(table.write_date, table.create_date)
@classmethod
@no_table_query