[FIX] report: datetime already imported, differently
This rev. is related to439cdb6871
. The module datetime was already available in the reports, and it was the entire datetime module that was imported, not just the class. This rev. is not recompatible with439cdb6871
, but there is no other choice, since other existing reports might already expected the datetime module and not the class opw-640299
This commit is contained in:
parent
db3e5716b3
commit
453b373a68
|
@ -38,7 +38,6 @@ import lxml.html
|
|||
import os
|
||||
import subprocess
|
||||
from contextlib import closing
|
||||
from datetime import datetime
|
||||
from distutils.version import LooseVersion
|
||||
from functools import partial
|
||||
from pyPdf import PdfFileWriter, PdfFileReader
|
||||
|
@ -143,7 +142,6 @@ class Report(osv.Model):
|
|||
context = dict(context, translatable=context.get('lang') != request.website.default_lang_code)
|
||||
values.update(
|
||||
time=time,
|
||||
datetime=datetime,
|
||||
context_timestamp=lambda t: fields.datetime.context_timestamp(cr, uid, t, context),
|
||||
translate_doc=translate_doc,
|
||||
editable=True,
|
||||
|
|
|
@ -123,7 +123,7 @@
|
|||
<div class="header">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<span t-esc="context_timestamp(datetime.now()).strftime('%Y-%m-%d %H:%M')"/>
|
||||
<span t-esc="context_timestamp(datetime.datetime.now()).strftime('%Y-%m-%d %H:%M')"/>
|
||||
</div>
|
||||
<div class="col-xs-2 col-xs-offset-2 text-center">
|
||||
<span t-esc="company.name"/>
|
||||
|
|
Loading…
Reference in New Issue