From 3d103402d21eed173aa4d04f56dfe615ea4a74fb Mon Sep 17 00:00:00 2001 From: "Bharat (OpenERP)" Date: Thu, 28 Jul 2011 15:37:15 +0530 Subject: [PATCH] [IMP] improved the code for getting date bzr revid: bde@tinyerp.com-20110728100715-hujz539r1usdeu4w --- addons/account/account.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 0364858fc58..8e653bd5d93 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -2122,8 +2122,7 @@ class account_model(osv.osv): for model in self.browse(cr, uid, ids, context=context): context_date = context.get('date') - str_date = time.strptime(context_date,"%Y-%m-%d") - date = datetime.fromtimestamp(mktime(str_date)) + date = datetime.strptime(context_date,"%Y-%m-%d") entry['name'] = model.name%{'year':date.strftime("%Y"), 'month':date.strftime("%m"), 'date': date.strftime("%Y-%m")} move_id = account_move_obj.create(cr, uid, { 'ref': entry['name'],