311
311
show_message = True
314
contract_ids = rpc.session.rpc_exec_auth_try('/object', 'execute', 'maintenance.contract', 'search', [])
318
maintenance_contract_message=_("""
319
<i>Open ERP crashed for an unknown reason.</i>
313
if not disconnected_mode:
314
maintenance = rpc.session.rpc_exec_auth_try('/object', 'execute', 'maintenance.contract', 'status')
316
if maintenance['status'] == 'none':
317
maintenance_contract_message=_("""
318
<b>An unknown error has been reported.</b>
321
320
<b>You do not have a valid Open ERP maintenance contract !</b>
322
321
If you are using Open ERP in production, it is highly suggested to subscribe
337
336
You can use the link bellow for more information. The detail of the error
338
337
is displayed on the second tab.
341
contract = rpc.session.rpc_exec_auth_try('/object', 'execute', 'maintenance.contract', 'read', contract_ids, [])[0]
342
show_message = (contract['kind'] <> 'full')
339
elif maintenance['status'] == 'partial':
344
340
maintenance_contract_message=_("""
345
<b>Open ERP crashed for an unknown reason.</b>
341
<b>An unknown error has been reported.</b>
347
343
Your maintenance contract does not cover all modules installed in your system !
348
344
If you are using Open ERP in production, it is highly suggested to upgrade your
351
If you have developped your own modules or installed third party module, we
347
If you have developed your own modules or installed third party module, we
352
348
can provide you an additional maintenance contract for these modules. After
353
349
having reviewed your modules, our quality team will ensure they will migrate
354
automatically for all futur stable versions of Open ERP at no extra cost.
350
automatically for all future stable versions of Open ERP at no extra cost.
356
352
Here is the list of modules not covered by your maintenance contract:
359
355
You can use the link bellow for more information. The detail of the error
360
is displayed on the second tab.""") % (",".join(result['modules']), )
356
is displayed on the second tab.""") % (", ".join(maintenance['uncovered_modules']), )
360
maintenance_contract_message=_("""
361
<b>An unknown error has been reported.</b>
363
<b>You do not have a valid Open ERP maintenance contract !</b>
364
If you are using Open ERP in production, it is highly suggested to subscribe
365
a maintenance program.
367
The Open ERP maintenance contract provides you a bugfix guarantee and an
368
automatic migration system so that we can fix your problems within a few
369
hours. If you had a maintenance contract, this error would have been sent
370
to the quality team of the Open ERP editor.
372
The maintenance program offers you:
373
* Automatic migrations on new versions,
374
* A bugfix guarantee,
375
* Monthly announces of potential bugs and their fixes,
376
* Security alerts by email and automatic migration,
377
* Access to the customer portal.
379
You can use the link bellow for more information. The detail of the error
380
is displayed on the second tab.
362
383
xmlGlade = glade.XML(terp_path('win_error.glade'), 'dialog_error', gettext.textdomain())
363
384
win = xmlGlade.get_widget('dialog_error')
379
400
xmlGlade.get_widget('notebook').remove_page(int(show_message))
382
def get_text_from_text_view(textView):
383
"""Retrieve the buffer from a text view and return the content of this buffer"""
384
buffer = textView.get_buffer()
385
return buffer.get_text(buffer.get_start_iter(), buffer.get_end_iter())
388
id_contract = contract['name']
389
traceback = get_text_from_text_view(xmlGlade.get_widget('details_explanation'))
390
explanation = get_text_from_text_view(xmlGlade.get_widget('explanation_textview'))
391
remarks = get_text_from_text_view(xmlGlade.get_widget('remarks_textview'))
393
content = "(%s) has reported the following bug:\n%s\nremarks: %s\nThe traceback is:\n%s" % (
394
id_contract, explanation, remarks, traceback
397
if upload_data('', content, 'error', id_contract):
398
common.message(_('You problem has been sent to the quality team !\nWe will recontact you after analysing the problem.'))
401
402
if not show_message:
404
def get_text_from_text_view(textView):
405
"""Retrieve the buffer from a text view and return the content of this buffer"""
406
buffer = textView.get_buffer()
407
return buffer.get_text(buffer.get_start_iter(), buffer.get_end_iter())
410
tb = get_text_from_text_view(xmlGlade.get_widget('details_explanation'))
411
explanation = get_text_from_text_view(xmlGlade.get_widget('explanation_textview'))
412
remarks = get_text_from_text_view(xmlGlade.get_widget('remarks_textview'))
414
if rpc.session.rpc_exec_auth_try('/object', 'execute', 'maintenance.contract', 'send', tb, explanation, remarks):
415
common.message(_('Your problem has been sent to the quality team !\nWe will recontact you after analysing the problem.'))
417
message(_('Your problem could <u>NOT</u> be sent to the quality team !\nPlease report this error manually at %s') % ('http://openerp.com/report_bug.html'))
402
419
xmlGlade.signal_connect('on_button_send_clicked', send)
403
420
xmlGlade.signal_connect('on_closebutton_clicked', lambda x : win.destroy())