From 98fe2523b3df4bcf929eb5ed75580cb2cb395a87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 15 Apr 2011 17:45:56 +0200 Subject: [PATCH] last_modification must not have microsecond The DateTime widget on client side can not handle microsecond and then it think the value has changed. --- trytond/ir/attachment.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trytond/ir/attachment.py b/trytond/ir/attachment.py index 1979ac44b1..e853d2e551 100644 --- a/trytond/ir/attachment.py +++ b/trytond/ir/attachment.py @@ -182,7 +182,8 @@ class Attachment(ModelSQL, ModelView): return firstline(values.get('description') or '') def get_last_modification(self, ids, name): - return dict((x.id, x.write_date if x.write_date else x.create_date) + return dict((x.id, (x.write_date if x.write_date else x.create_date + ).replace(microsecond=0)) for x in self.browse(ids)) def get_last_user(self, ids, name):