~openerp-community/openobject-addons/taktik

« back to all changes in this revision

Viewing changes to account/account_bank_statement.py

  • Committer: Fabien Lydoire
  • Date: 2010-06-21 11:23:31 UTC
  • Revision ID: fl@taktik.be-20100621112331-sl5dhbhiu1j0o7uu
added better message for statement line error message

Show diffs side-by-side

added added

removed removed

Lines of Context:
199
199
                    line = account_bank_statement_line_obj.browse(cr,uid,move_id_already_reconciled_line_id_rel[move_line_id])
200
200
                    line_name = line.name
201
201
                    line_ref = line.ref
 
202
                    line_date = line.date
 
203
                    line_partner = line.partner_id.name
202
204
                    reconciled_lines = move_line.reconcile_id.line_id
203
205
                    for rl in reconciled_lines:
204
206
                        if rl.statement_id:
210
212
                            statement_line_name = statement_line['name']
211
213
                            statement_line_ref = statement_line['ref']
212
214
                            
213
 
                            msg = msg + '\n- In statement line '+line_name.encode('utf8')+(line_ref and (' ('+line_ref.encode('utf8')+') ') or '')+'\n   an entry is already reconciled '
 
215
                            msg = msg + '\n- In statement line '+line_name.encode('utf8')+(line_ref and (' ('+line_ref.encode('utf8')+') ') or '')+' '+str(line_date)+' '+(line_partner and line_partner.encode('utf8') or '')+'\n   an entry is already reconciled '
214
216
                            msg = msg + '\n   from statement '+statement_name.encode('utf8')+'\n   line '+statement_line_name.encode('utf8')+(statement_line_ref and (' ('+statement_line_ref.encode('utf8')+') ') or '')                    
215
217
                raise osv.except_osv(_('Error !'),_('Reconciled entries in this statement are already reconciled !\n'+msg.decode('utf8')))
216
218