Skip to content

Convert HTML to Image

from html2image import HTML2Image

with HTML2Image('<html><strong>Fooo</strong></html>', width='300') as html:
    image = html.render()
import os
from ast import literal_eval
import tempfile
import subprocess
from flask import Flask, abort, request, Response
from flask.ext.mako import MakoTemplates, render_template
from destral.openerp import OpenERPService
from destral.transaction import Transaction


  • Create user replication in the master
sudo -u postgres psql -c "CREATE USER rep REPLICATION \
  • Modify postgresql.conf in the master
listen_address = # make sure we're listening as appropriate
wal_level = hot_standby
Use ERPPeek or OOOP interface compatible insed OpenERP.
client = PoolWrapper(pool, cursor, uid)[])
partner_obj = client.ResPartner
partner_obj.write([1], {'name': 'Fooo!'})
import logging
import os
import click
from erppeek import Client
logger = logging.getLogger('installer')
def setup_peek(**peek_config):
import os
print "Descarregant PDF comers..."
os.system('curl "" > comers.pdf')
print "Transformant a TXT..."
os.system('pdftotext comers.pdf')
print "Creant diccionari..."
c = open('comers.txt', 'r').read()
#!/usr/bin/env python
#-*- coding:utf-8 -*-
"""Credits to:
import os
import BaseHTTPServer
import sys
import time
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import BaseHTTPServer
import sys
import time
import urlparse
import json
def _check_bank(acc_number):
"""Funció AJAX per comprovar el número de compte bancari."""
O = app.config['OOOP']
spain =[('code', '=', 'ES')])[0]
lang = '%s_ES' % get_locale()
vals = O.ResPartnerBank.onchange_banco([], acc_number, spain,
{'lang': lang})
res = {'message': '', 'status': False}
if 'warning' in vals:


Fix for unicode can't decode ascii...

Something went wrong with that request. Please try again.