From 453b373a685d652bc8e542284a0da899ce5ffccd Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Wed, 20 May 2015 12:16:49 +0200 Subject: [PATCH] [FIX] report: datetime already imported, differently This rev. is related to 439cdb6871b03a4af9a64fe5945e862d6c8768e2. 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 with 439cdb6871b03a4af9a64fe5945e862d6c8768e2, but there is no other choice, since other existing reports might already expected the datetime module and not the class opw-640299 --- addons/report/models/report.py | 2 -- addons/report/views/layouts.xml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/report/models/report.py b/addons/report/models/report.py index 9c3e0cccd50..10142ff0695 100644 --- a/addons/report/models/report.py +++ b/addons/report/models/report.py @@ -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, diff --git a/addons/report/views/layouts.xml b/addons/report/views/layouts.xml index 963810c384e..dbd115401c1 100644 --- a/addons/report/views/layouts.xml +++ b/addons/report/views/layouts.xml @@ -123,7 +123,7 @@
- +