Cambios en develop

This commit is contained in:
Mauricio Baeza 2018-01-23 23:08:40 -06:00
parent 33994b6970
commit 6b24d7819d
1 changed files with 16 additions and 0 deletions

View File

@ -1013,6 +1013,22 @@ class LIBO(object):
msg = 'Empleados importados correctamente'
return rows, msg
def invoice(self, path):
options = {'AsTemplate': True, 'Hidden': True}
doc = self._doc_open(path, options)
if doc is None:
return (), 'No se pudo abrir la plantilla'
data, msg = self._get_data(doc)
doc.close(True)
if len(data) == 1:
msg = 'Sin datos para importar'
return (), msg
rows = tuple(data[1:])
return rows, ''
def to_pdf(data, emisor_rfc, ods=False):
rfc = data['emisor']['rfc']