[REV] datetime for source-only WebAsset

thinking about it, this is the *inline* data taken directly from the template,
probably makes more sense if it does not change the coalesced asset's
last_modified

bzr revid: xmo@openerp.com-20140417143656-upgj5b0syi10c9ve
This commit is contained in:
Xavier Morel
2014-04-17 16:36:56 +02:00
parent d9f26840af
commit 424f03c172
+1 -1
View File
@@ -1066,7 +1066,7 @@ class WebAsset(object):
def last_modified(self):
if self.source:
# TODO: return last_update of bundle's ir.ui.view
return datetime.datetime.utcnow()
return datetime.datetime(1970, 1, 1)
return datetime.datetime.fromtimestamp(os.path.getmtime(self.filename))
class JavascriptAsset(WebAsset):