From 73c752579840552bad0755974eb776c21b48aa55 Mon Sep 17 00:00:00 2001 From: "ARA (OpenERP)" Date: Wed, 13 Jul 2011 14:22:39 +0530 Subject: [PATCH] [IMP] account: uninitialized period_id bzr revid: ara@tinyerp.com-20110713085239-2yb1ou83yg3m8ey7 --- addons/account/account_move_line.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 173d8ed7bd3..b428d6a705e 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -591,8 +591,7 @@ class account_move_line(osv.osv): return True def _check_date(self, cr, uid, ids, context=None): - lines = self.browse(cr, uid, ids, context=context) - for l in lines: + for l in self.browse(cr, uid, ids, context=context): if l.journal_id.allow_date: if not time.strptime(l.date[:10],'%Y-%m-%d') >= time.strptime(l.period_id.date_start, '%Y-%m-%d') or not time.strptime(l.date[:10], '%Y-%m-%d') <= time.strptime(l.period_id.date_stop, '%Y-%m-%d'): return False