This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from itertools import ifilter | |
UNIDADES = ( | |
'', | |
'UN ', | |
'DOS ', | |
'TRES ', | |
'CUATRO ', | |
'CINCO ', | |
'SEIS ', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# Estas cedulas fueron emitidas por la JCE, pero no cumplen con el | |
# digito verificador, por lo cual deben ser verificadas por separado. | |
import csv | |
import cPickle | |
__author__ = 'eneldoserrata' | |
excepcionesCedulas = ['00000000018', '11111111123', '00100759932', '00105606543', '00114272360', '00200123640', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from cherrypy.process.plugins import SimplePlugin | |
from sqlalchemy import create_engine | |
from sqlalchemy.ext.declarative import declarative_base, declared_attr | |
from sqlalchemy.orm.scoping import scoped_session | |
from sqlalchemy.orm.session import sessionmaker | |
from sqlalchemy.schema import Column | |
from sqlalchemy.types import Integer | |
import sqlamp | |
import cherrypy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE FROM stock_pack_operation; | |
DELETE FROM stock_picking; | |
DELETE FROM stock_move; | |
DELETE FROM sale_order_line; | |
DELETE FROM sale_order; | |
DELETE FROM account_invoice_line; | |
DELETE FROM account_invoice; | |
DELETE FROM account_move_line; | |
DELETE FROM account_move; | |
DELETE FROM pos_order_line; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE FROM account_partial_reconcile; | |
delete from pos_order; | |
delete from pos_session; | |
DELETE FROM stock_pack_operation; | |
DELETE FROM stock_picking; | |
DELETE FROM stock_move; | |
DELETE FROM sale_order_line; | |
DELETE FROM sale_order; | |
DELETE FROM account_invoice_line; | |
DELETE FROM account_invoice; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import cherrypy | |
from cherrypy.process.plugins import SimplePlugin | |
from mako import exceptions | |
from mako.lookup import TemplateLookup | |
# todo-eneldo Documentar | |
# todo-eneldo capturar exceptions | |
# todo-eneldo crear test units |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 443; | |
server_name fhisa.tabla.si; | |
access_log /var/log/nginx/fhisa.access.log; | |
error_log /var/log/nginx/fhisa.error.log; | |
ssl on; | |
ssl_certificate /etc/nginx/ssl/fhisa.crt; | |
ssl_certificate_key /etc/nginx/ssl/fhisa.key; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Install wkhtmltopdf | |
cd /usr/local/src | |
wget https://downloads.wkhtmltopdf.org/0.12/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | |
tar xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | |
ln -s -f /usr/local/src/wkhtmltox/bin/wkhtmlto* /usr/bin/ | |
cd ~ | |
chown -R $OE_USER: /usr/local/src/wkhtmltox | |
chown -R $OE_USER: /usr/bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Install wkhtmltopdf | |
cd /usr/local/src | |
wget https://downloads.wkhtmltopdf.org/0.12/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | |
tar xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | |
ln -s -f /usr/local/src/wkhtmltox/bin/wkhtmlto* /usr/bin/ | |
cd ~ | |
chown -R $OE_USER: /usr/local/src/wkhtmltox | |
chown -R $OE_USER: /usr/bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Binary(http.Controller): | |
@http.route('/web/binary/download_document', type='http', auth="public") | |
@serialize_exception | |
def download_document(self, model, field, id, filename=None, **kw): | |
""" Download link for files stored as binary fields. | |
:param str model: name of the model to fetch the binary from | |
:param str field: binary field | |
:param str id: id of the record from which to fetch the binary | |
:param str filename: field holding the file's name, if any |
OlderNewer