~vauxoo/addons-vauxoo/7.0-user_story_fix1-kty

« back to all changes in this revision

Viewing changes to winpdb_debugger/winpdb_debugger.py

 
[ADD] Added translation files and descriptions field in configure_account_partner module

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
##############################################################################
 
3
#
 
4
#    OpenERP, Open Source Management Solution
 
5
#    Addons modules by CLEARCORP
 
6
#    Copyright (C) 2009-TODAY (<http://clearcorp.co.cr>).
 
7
#
 
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.
 
12
#
 
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.
 
17
#
 
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/>.
 
20
#
 
21
##############################################################################
 
22
 
 
23
 
 
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()
 
28
 
 
29
import rpdb2
 
30
 
 
31
"""
 
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"/>
 
36
</form>
 
37
'''
 
38
 
 
39
finish_form ='''<?xml version="1.0"?>
 
40
<form string="Winpdb debugger">
 
41
    <label string="Winpdb attached or timeout." colspan="4"/>
 
42
</form>
 
43
'''
 
44
"""
 
45
class winpdb_debugger_wizard(osv.osv_memory):
 
46
    _name = 'winpdb.debugger.wizard'
 
47
 
 
48
    def action_start_debugger(self, cr, uid, data, context):
 
49
        rpdb2.start_embedded_debugger(config['admin_passwd'])
 
50
        return{}
 
51
 
 
52
 
 
53
 
 
54
 
 
55
winpdb_debugger_wizard()
 
56
 
 
57
 
 
58
"""
 
59
return {
 
60
            'view_type': 'form',
 
61
            'view_mode': 'form',
 
62
            'res_model': 'winpdb.debugger.wizard',
 
63
            'views': [('winpdb_debugger_close__wizard','form')],
 
64
            'type': 'ir.actions.act_window',
 
65
            'target': 'new',
 
66
            'context': context,
 
67
        }
 
68
 
 
69
 
 
70
"""