store date as datetime (commit from production server)
This commit is contained in:
parent
8f5599bca9
commit
dd433d89fa
|
@ -4,6 +4,8 @@ import datetime
|
|||
import os
|
||||
import logging
|
||||
|
||||
from DateTime import DateTime
|
||||
|
||||
from Products.CMFCore.utils import getToolByName
|
||||
from Products.Five.browser import BrowserView
|
||||
from plone.namedfile.file import NamedBlobFile
|
||||
|
@ -102,6 +104,9 @@ class LoadFromOcr(BrowserView):
|
|||
ocr_file = NamedBlobFile(file(os.path.join(base, filename)).read(),
|
||||
filename=unicode(filename))
|
||||
|
||||
if ocr_date:
|
||||
ocr_date = datetime.date.fromordinal(ocr_date.toordinal())
|
||||
|
||||
if doctype == 'incoming_mails':
|
||||
factory = 'courrier_entrant'
|
||||
kwargs = {'numero_courrier': number,
|
||||
|
|
Reference in New Issue