[IMP] Improved code for the condition when the Opening With Last closing Balance is marked true.

bzr revid: psa@tinyerp.com-20131115110746-omzn51lsqhnctsqn
This commit is contained in:
Paramjit Singh Sahota 2013-11-15 16:37:46 +05:30
parent b15ef95e41
commit e8beafdce3
1 changed files with 2 additions and 2 deletions

View File

@ -450,8 +450,8 @@ class account_bank_statement(osv.osv):
def _compute_balance_end_real(self, cr, uid, journal_id, context=None):
res = False
journal = self.pool.get('account.journal').browse(cr, uid, journal_id,context=context)
if journal_id and journal.with_last_closing_balance:
journal = self.pool.get('account.journal').browse(cr, uid, journal_id, context=context)
if journal.with_last_closing_balance:
cr.execute('SELECT balance_end_real \
FROM account_bank_statement \
WHERE journal_id = %s AND NOT state = %s \