modify button confirmation action

bzr revid: mra@tinyerp.com-20080822115340-9qi06s066v7igmhr
This commit is contained in:
Mustufa Rangwala 2008-08-22 17:23:40 +05:30
parent a2acce64f6
commit 3f649972d9
1 changed files with 3 additions and 1 deletions

View File

@ -138,7 +138,7 @@ class account_bank_statement(osv.osv):
'currency': fields.function(_currency, method=True, string='Currency',
type='many2one', relation='res.currency'),
}
_defaults = {
'name': lambda self, cr, uid, context=None: \
self.pool.get('ir.sequence').get(cr, uid, 'account.bank.statement'),
@ -289,6 +289,8 @@ class account_bank_statement(osv.osv):
except:
raise osv.except_osv(_('Error !'), _('Unable to reconcile entry "%s": %.2f') % (move.name, move.amount))
if st.journal_id.entry_posted:
account_move_obj.write(cr, uid, [move_id], {'state':'posted'})
done.append(st.id)
self.write(cr, uid, done, {'state':'confirm'}, context=context)
return True