This file contains hidden or 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
@@ -366,6 +366,8 @@ | |
n = doc.createElement("DIPE_FACT_ENERGIA") | |
facturacion.appendChild(n) | |
+ if t.name.codi.startswith('6'): | |
+ t.facturacio_energia = 0.0 | |
txt = doc.createTextNode(str(t.facturacio_energia)) | |
n.appendChild(txt) | |
This file contains hidden or 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
for i in `psql -l -A -t | grep -v 'postgres' | grep -v 'proxy'| cut -d '|' -f 1 `; do | |
psql -d $i -c "alter table giscedata_liquidacio_fpcc_tarifa DROP CONSTRAINT giscedata_liquidacio_fpcc_tarifa_tarifa_uniq;" ; | |
done |
This file contains hidden or 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
#!/bin/bash | |
pep8 $(git status -s | grep '\.py$' | cut -c3-) |
This file contains hidden or 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
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" | |
} | |
export PS1="\u@\h \w \`parse_git_branch\`\$ " |
This file contains hidden or 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
#!/bin/bash | |
pids=`ps ax | grep openerp-server | grep -v grep | cut -c -6` | |
echo "Matarem uns quants erps's.... ($pids)" | |
kill -9 $pids |
This file contains hidden or 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
#!/bin/bash | |
d_repo=( $(git remote -v | grep '\(push\)' | cut -d':' -f 2 | \ | |
cut -d' ' -f 1 | cut -d '.' -f 1) ) | |
d_base="developer" | |
d_from=gisce:$(git branch --no-color 2> /dev/null | grep '^\*' | \ | |
cut -d ' ' -f 2) | |
read -p "User:" user | |
read -sp "Password:" password | |
echo |
This file contains hidden or 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
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" | |
} | |
export PS1="\u@\h \w \`parse_git_branch\`\$ " |
This file contains hidden or 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
#!/bin/bash | |
# To clean demo data from a newly installed geoserver you have to delete some data from `GEOSERVER_DATA_DIR` | |
# Info from http://gis.stackexchange.com/questions/33049/automating-removal-of-all-demo-layers-from-geoserver | |
GEOSERVER_DATA_DIR=/var/lib/tomcat7/webapps/geoserver/data/ | |
TOMCAT_USER=tomcat7 | |
TOMCAT_GRP=tomcat7 | |
cd ${GEOSERVER_DATA_DIR} |
This file contains hidden or 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
SELECT | |
c.id,c.state, | |
split_part(c.name,'(',2) AS contador, | |
split_part(c.ref2,',',2) AS id_contador, | |
c.description, | |
m.name | |
FROM crm_case AS c | |
LEFT JOIN giscedata_lectures_comptador m ON (m.id=split_part(c.ref2,',',2)::int) | |
WHERE state='open' AND description LIKE '%lecturas_diferentes_encontradas%'; |
This file contains hidden or 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 erppeek import Client | |
import sys | |
import base64 | |
from subprocess import call | |
import time | |
#report = 'giscedata.facturacio.factura' | |
#ids = [1513047, 1513049, 1513057, 1513042] | |
#ids = [1513042] |
OlderNewer