[IMP] account: uninitialized period_id

bzr revid: ara@tinyerp.com-20110713085239-2yb1ou83yg3m8ey7
This commit is contained in:
ARA (OpenERP) 2011-07-13 14:22:39 +05:30
parent f0b04ccee2
commit 73c7525798
1 changed files with 1 additions and 2 deletions

View File

@ -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