1
# -*- encoding: utf-8 -*-
2
###########################################################################
3
# Module Writen to OpenERP, Open Source Management Solution
5
# Copyright (c) 2011 Vauxoo - http://www.vauxoo.com
7
# info Vauxoo (info@vauxoo.com)
8
############################################################################
9
# Coded by: moylop260 (moylop260@vauxoo.com)
10
# Financed by: http://www.sfsoluciones.com (aef@sfsoluciones.com)
11
############################################################################
13
# This program is free software: you can redistribute it and/or modify
14
# it under the terms of the GNU Affero General Public License as
15
# published by the Free Software Foundation, either version 3 of the
16
# License, or (at your option) any later version.
18
# This program is distributed in the hope that it will be useful,
19
# but WITHOUT ANY WARRANTY; without even the implied warranty of
20
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
# GNU Affero General Public License for more details.
23
# You should have received a copy of the GNU Affero General Public License
24
# along with this program. If not, see <http://www.gnu.org/licenses/>.
26
##############################################################################
38
import xml.dom.minidom
39
from datetime import datetime, timedelta
40
from tools.misc import ustr
42
from SOAPpy import WSDL
44
print "Package SOAPpy missed"
47
####Agregar traducciones
48
_form = '''<?xml version="1.0"?>
49
<form string="Export invoice Solucion Factible">
50
<image name="gtk-dialog-info" colspan="2"/>
51
<group colspan="2" col="4">
54
<field name="msg" nolabel="1" colspan="3"/>
81
def _get_invoice_id(self, cr, uid, data, context = {}):
83
pool = pooler.get_pool(cr.dbname)
84
invoice_obj = pool.get('account.invoice')
85
res = invoice_obj._get_file(cr, uid, data['ids'])
88
def _upload_to_pac(self, cr, uid, data, context ={}):
90
pool = pooler.get_pool(cr.dbname)
91
invoice_obj = pool.get('account.invoice')
92
res = invoice_obj._upload_ws_file(cr, uid, data['ids'])
95
class wizard_export_invoice_pac_sf(wizard.interface):
98
'actions': [ _get_invoice_id ],
99
'result': {'type': 'state', 'state':'show_view'},
108
'state': [ ('end', '_Cerrar', 'gtk-cancel', False), ('upload_ws', '_Subir Archivo', 'gtk-ok', True) ]
113
'actions': [ _upload_to_pac ],
114
'result': {'type': 'state', 'state':'show_view'},
117
wizard_export_invoice_pac_sf('wizard.export.invoice.pac.sf')