1
# -*- encoding: utf-8 -*-
6
from psycopg2 import connect
8
conexion=connect("dbname=GBW_1_junio host=127.0.0.1 port=5432 user=gbw password=1234")
12
cr.execute("""SELECT a.internal_number, i.db_datas, i.datas_fname from ir_attachment i, account_invoice a
13
where i.file_type<> 'application/xml' and i.res_model ='account.invoice'
14
and i.db_datas is not NULL and a.id = i.res_id
21
print '-----------file name',d[2]
22
file_name = '/home/yzaack/instancias/6.0/server/bin/filestore/GBW_1_junio/mjfZwqOqgL/%s' % d[2]
23
file_pdf = open(file_name,'wb')
24
file_pdf.write(string_pdf)
27
print '-------el total de PDF generados',count