2
# -*- encoding: utf-8 -*-
3
###########################################################################
4
# Module Writen to OpenERP, Open Source Management Solution
5
# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
7
# Credits######################################################
8
# Coded by: Vauxoo C.A.
9
# Planified by: Nhomar Hernandez
10
# Audited by: Vauxoo C.A.
11
#############################################################################
12
# This program is free software: you can redistribute it and/or modify
13
# it under the terms of the GNU Affero General Public License as published by
14
# the Free Software Foundation, either version 3 of the License, or
15
# (at your option) any later version.
17
# This program is distributed in the hope that it will be useful,
18
# but WITHOUT ANY WARRANTY; without even the implied warranty of
19
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
# GNU Affero General Public License for more details.
22
# You should have received a copy of the GNU Affero General Public License
23
# along with this program. If not, see <http://www.gnu.org/licenses/>.
24
##########################################################################
26
from openerp.osv import osv, fields
27
import openerp.tools as tools
28
from openerp.tools.translate import _
30
from tools import config
31
import openerp.netsvc as netsvc
32
import decimal_precision as dp
35
from migrate import loadProjectsTasks
38
class load_issue(osv.TransientModel):
42
'issue': fields.binary('File XLS', requered=True,
43
help="Put a xmind file"),
44
'db': fields.char('Date Base', 40, help="Name of data base"),
45
'port': fields.integer('XML-RPC Port',
46
help="XML-RPC Port of server to load data"),
47
'passs': fields.char('Password', 60,
48
help="Password of data base"),
49
'user': fields.char('User', 60, help="User of data base"),
50
'host': fields.char('Host', 60, help="IP adreess of server"),
57
'host': '70.38.44.102',
60
def xls_file(self, cr, uid, ids, context={}):
61
wz_brw = self.browse(cr, uid, ids, context=context)[0]
62
archivo = open("/tmp/load_issue.xls", "w")
63
project_obj = self.pool.get('project.project')
64
archivo.write(base64.b64decode(
65
wz_brw and wz_brw.issue or 'Archivo Invalido'))
68
if wz_brw.db and wz_brw.port and wz_brw.passs and wz_brw.user and wz_brw.host:
70
'/tmp/load_issue.xls', wz_brw.host, wz_brw.port, wz_brw.db, wz_brw.user, wz_brw.passs)