[FIX] account: avoid translate tool missing import on strictier Python 2.6 versions; bare in mind that mx.Datetime should be eraticated from the surface of the earth

bzr revid: rvalyi@gmail.com-20091103051710-koeenh3su23yvls2
This commit is contained in:
Raphaël Valyi 2009-11-03 03:17:10 -02:00
parent 50071d7df3
commit 2dabd5f34f
1 changed files with 3 additions and 2 deletions

View File

@ -25,7 +25,8 @@ import netsvc
import time
import osv
import pooler
from mx import DateTime
from datetime import datetime
from tools.translate import _
_transaction_form = '''<?xml version="1.0"?>
<form string="Reconciliation">
@ -74,7 +75,7 @@ def _trans_rec_reconcile(self, cr, uid, data, context=None):
context['date_p'] = form.get('date_p', False)
date = False
if context['date_p']:
date = DateTime.strptime(context['date_p'], '%Y-%m-%d')
date = datetime.strptime(context['date_p'], '%Y-%m-%d')
ids = pool.get('account.period').find(cr, uid, dt=date, context=context)
period_id = False
if len(ids):