[FIX]journal_id and period_id check wrong in _get_date

bzr revid: dle@openerp.com-20121127100418-iv8gkbh4r391qz6m
This commit is contained in:
Denis Ledoux dle@openerp.com 2012-11-27 11:04:18 +01:00
parent b51841b842
commit e046bb6650
1 changed files with 1 additions and 1 deletions

View File

@ -476,7 +476,7 @@ class account_move_line(osv.osv):
context or {}
period_obj = self.pool.get('account.period')
dt = time.strftime('%Y-%m-%d')
if ('journal_id' in context) and ('period_id' in context):
if context.get('journal_id') and context.get('period_id'):
cr.execute('SELECT date FROM account_move_line ' \
'WHERE journal_id = %s AND period_id = %s ' \
'ORDER BY id DESC limit 1',