~unifield-team/unifield-wm/us-826

« back to all changes in this revision

Viewing changes to msf_doc_import/wizard/wizard_import_tender_line.py

  • Committer: Quentin THEURET
  • Date: 2016-02-19 09:09:29 UTC
  • Revision ID: qt@tempo-consulting.fr-20160219090929-8tdq1manigke86yg
US-826 [FIX] Add message on non-consistency of order and products in order lines at import

Show diffs side-by-side

added added

removed removed

Lines of Context:
203
203
                    if not context.get('yml_test', False):
204
204
                        cr.commit()
205
205
 
 
206
            categ_log = tender_obj.onchange_categ(
 
207
                    cr, uid, [tender_browse.id], tender_browse.categ, context=context).get('warning', {}).get('message', '').upper()
 
208
            categ_log = categ_log.replace('THIS', 'THE')
 
209
 
206
210
        error_log += '\n'.join(error_list)
207
211
        if error_log:
208
212
            error_log = _("Reported errors for ignored lines : \n") + error_log
209
213
        end_time = time.time()
210
214
        total_time = str(round(end_time-start_time)) + _(' second(s)')
211
 
        final_message = _(''' 
 
215
        final_message = _('''
 
216
%s
212
217
Importation completed in %s!
213
218
# of imported lines : %s on %s lines
214
219
# of ignored lines: %s
216
221
%s
217
222
 
218
223
%s
219
 
''') % (total_time ,complete_lines, line_num, ignore_lines, lines_to_correct, error_log, message)
 
224
''') % (categ_log, total_time ,complete_lines, line_num, ignore_lines, lines_to_correct, error_log, message)
220
225
#        try:
221
226
        wizard_vals = {'message': final_message, 'state': 'done'}
222
227
        if line_with_error: