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
Enable debug in PostgreSQL | |
PgAdmin comes with built-in support for debugging your Pl/PgSQL programs. However in order to enable this, you’ll have to compile and install extra plug-in to PostgreSQL. | |
I Googled a lot but didn’t find one single post with all steps so here we go: ( I did this on my Ubuntu) | |
Prepare environment: | |
By default, Ubuntu doen’t come with the most recent PostgreSQL. You can do the following to add PostgreSQL’s offical repository so you get the most up-to-date version (v9.6 at the time of writing). Refer to https://www.postgresql.org/download/linux/ubuntu/ | |
Create file /etc/apt/sources.list.d/pgdg.list, and add following 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
import openpyxl | |
from openerp import models, fields, api, _ | |
from tempfile import TemporaryFile | |
class ExcelReader(models.TransientModel): | |
_name="reader_excel" | |
excel_file = fields.Binary(string='Excel File') | |
def import_excel(self): |
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
upstream odoo { | |
server localhost:8069 weight=1 fail_timeout=3000s; | |
} | |
upstream polling { | |
server localhost:8072 weight=1 fail_timeout=3000s; | |
} | |
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
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
import urllib2 | |
import httplib | |
import json | |
# have to export the DER certify recived from azul to base64 | |
# openssl x509 -inform der -in MYCERT.cer -out my_cert.crt | |
# I ended up solving this by concatenating | |
# the private key you use to generate crs with your converted cert | |
# cat my_key.key my_cert.crt > certify.pem | |
CERT = "certify.pem" |
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
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
# -*- 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 |