[IMP] Account: Bank statements will not consider boolean on journal entry_posted

bzr revid: mra@mra-laptop-20100826085358-d4jgljoknte4q9yd
This commit is contained in:
Mustufa Rangwala 2010-08-26 14:23:58 +05:30
parent 3971b7a55a
commit f43ab717cc
1 changed files with 3 additions and 4 deletions

View File

@ -368,16 +368,15 @@ class account_bank_statement(osv.osv):
else:
account_move_line_obj.reconcile_partial(cr, uid, torec, 'statement', context)
if st.journal_id.entry_posted:
account_move_obj.write(cr, uid, [move_id], {'state': 'posted'})
self.log(cr, uid, st.id, 'Statement %s is confirmed and entries are created.' % st.name)
done.append(st.id)
next_number = obj_seq.get(cr, uid, 'account.bank.statement')
if not st.name == '/':
next_number = st.name + '/' + next_number[-1:]
account_move_obj.write(cr, uid, [move_id], {'state': 'posted', 'name': next_number})
account_move_obj.write(cr, uid, [move_id], {'name': next_number})
account_move_obj.write(cr, uid, [move_id], {'state': 'posted'}) # Bank statements will not consider boolean on journal entry_posted
self.write(cr, uid, [st.id], {'name': next_number}, context=context)
self.write(cr, uid, done, {'state':'confirm'}, context=context)