1
# -*- coding: utf-8 -*-
2
##############################################################################
4
# OpenERP, Open Source Management Solution
5
# Addons modules by CLEARCORP
6
# Copyright (C) 2009-TODAY (<http://clearcorp.co.cr>).
8
# This program is free software: you can redistribute it and/or modify
9
# it under the terms of the GNU Affero General Public License as
10
# published by the Free Software Foundation, either version 3 of the
11
# License, or (at your option) any later version.
13
# This program is distributed in the hope that it will be useful,
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
# GNU Affero General Public License for more details.
18
# You should have received a copy of the GNU Affero General Public License
19
# along with this program. If not, see <http://www.gnu.org/licenses/>.
21
##############################################################################
24
from openerp.osv import osv,fields
25
from openerp.tools.translate import _
26
from openerp.tools import config
27
#~ import pdb;pdb.set_trace()
32
ask_form ='''<?xml version="1.0"?>
33
<form string="Winpdb debugger">
34
<label string="Open Winpdb and set the password to the OpenERP server administrator password. Then clic 'Start Winpdb debugger'." colspan="4"/>
35
<label string="The system will wait for 5 minutes until you open a connection. If no connection is opened, the server will continue." colspan="4"/>
39
finish_form ='''<?xml version="1.0"?>
40
<form string="Winpdb debugger">
41
<label string="Winpdb attached or timeout." colspan="4"/>
45
class winpdb_debugger_wizard(osv.osv_memory):
46
_name = 'winpdb.debugger.wizard'
48
def action_start_debugger(self, cr, uid, data, context):
49
rpdb2.start_embedded_debugger(config['admin_passwd'])
55
winpdb_debugger_wizard()
62
'res_model': 'winpdb.debugger.wizard',
63
'views': [('winpdb_debugger_close__wizard','form')],
64
'type': 'ir.actions.act_window',