last_modification must not have microsecond

The DateTime widget on client side can not handle microsecond and then it
think the value has changed.
This commit is contained in:
Cédric Krier committed 2011-04-15 17:45:56 +02:00
1 parent 0fd683da2c
commit 98fe2523b3
1 file changed
+2 -1
+2 -1
View File
@@ -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):