[IMP]: opening balance should be 0 if Opening with last Closing balance is false

bzr revid: aja@tinyerp.com-20131114092211-qn3rqj8b1kyyfah6
This commit is contained in:
ajay javiya (OpenERP) 2013-11-14 14:52:11 +05:30
parent 510fb17b3e
commit 4a290baa5e
1 changed files with 2 additions and 1 deletions

View File

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