Workers
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
cd /usr/local/src/odoo | |
## delete matches="..." at /web/database/manager | |
sed -i 's/matches="[^"]*"//g' addons/web/static/src/xml/base.xml | |
## disable im_odoo_support | |
sed -i "s/'auto_install': True/'auto_install': False/" addons/im_odoo_support/__openerp__.py |
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
# PS1 for remote root | |
# \t \h \w\$ | |
export PS1='\[\033[00;31m\]\t \[\033[01;31m\]\h \[\033[01;34m\]\w\[\033[01;31m\]\$\[\033[00m\] ' | |
# https://wiki.archlinux.org/index.php/Color_Bash_Prompt |
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
# connect to docker | |
docker exec -i --user=root -t db-9.5 /bin/bash | |
# inside docker | |
psql -U odoo | |
# inside psql | |
select datname, count(*) from pg_stat_activity group by datname; | |
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
# fix line break symbols | |
find * -type f | grep -v ".\(svg\|png\|jpg\)$" | xargs sed -i 's/\r//g' | |
# trim trailing whitespaces | |
find * -type f | grep -v ".\(svg\|png\|jpg\)$" | xargs sed -i 's/[ \t]*$//g' | |
#PEP8 для py-файлов: | |
autopep8 --in-place -r --aggressive --aggressive --ignore E501 ./ | |
# fix CamelCase |
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
# IMPORTS | |
# replace osv, orm | |
find . -type f -name '*.py' | xargs sed -i 's/from openerp.osv import orm$/from odoo import models/g' | |
find . -type f -name '*.py' | xargs sed -i 's/from openerp.models.orm import Model$/from odoo.models import Model/g' | |
find . -type f -name '*.py' | xargs sed -i 's/osv.osv_memory/models.TransientModel/g' | |
find . -type f -name '*.py' | xargs sed -i 's/osv.osv/models.Model/g' | |
find . -type f -name '*.py' | xargs sed -i 's/osv.except_osv/UserError/g' | |
find . -type f -name '*.py' | xargs sed -i 's/osv\./models./g' | |
find . -type f -name '*.py' | xargs sed -i 's/\<orm\./models./g' | |
find . -type f -name '*.py' | xargs sed -i 's/\(import .*\), osv/\1, models/g' |
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
''' | |
# Installation: | |
sudo pip install PyGithub | |
# create token here: https://github.com/settings/tokens (you don't need to set any access checkboxes there) | |
# Usage | |
curl -s https://gist.githubusercontent.com/yelizariev/3d5152df5226d03f8bcea08ece939e9a/raw/pull-requests-portfolio.py | python - --token=ABCDE \ | |
"https://github.com/it-projects-llc/access-addons/pull/26" \ |
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 80; | |
#rewrite ^/.*$ https://$host$request_uri? permanent; #Uncomment this line in case you want to use https only | |
server_name NGINX_SERVER_DOMAIN; | |
include odoo_params; | |
location /longpolling { | |
proxy_pass http://SERVER_HOST:8072; | |
} |
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
cd /path/to/module/ | |
# view source | |
find . -iname "*.py" -or -iname "*.xml" -or -iname "*.csv" -or -iname "*.yml" -or -iname "*.rst" -or -iname "*.md" | xargs tail -n +1 | less | |
# view source without docs | |
find . -iname "*.py" -or -iname "*.xml" -or -iname "*.csv" -or -iname "*.yml" | xargs tail -n +1 | less | |
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
# 8.0 | |
docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo --name db-geo-8 camptocamp/postgres | |
docker run -d --name geo-8 -p 8069:8069 -p 8072:8072 -e ODOO_MASTER_PASS=master --link db-geo-8:db -v /root/odoo/odoo-8.0/geospatial/:/mnt/addons/extra/geospatial -t itprojectsllc/install-odoo:8.0 -- --db-filter=^%d$ | |
docker exec -u odoo -i -t geo-8 /bin/bash -c "export UPDATE_ADDONS_PATH='yes'; bash /install-odoo-saas.sh" | |
# 10.0 | |
docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo --name db-geo-10 camptocamp/postgres | |
docker run -d --name geo-10 -p 8069:8069 -p 8072:8072 -e ODOO_MASTER_PASS=master --link db-geo-10:db -v /root/odoo/odoo-10.0/geospatial/:/mnt/addons/extra/geospatial -t itprojectsllc/install-odoo:10.0 -- --db-filter=^%d$ | |
docker exec -u odoo -i -t geo-10 /bin/bash -c "export UPDATE_ADDONS_PATH='yes'; bash /install-odoo-saas.sh" | |
git -C /root/odoo/odoo-10.0/geospatial/ pull upstream pull/146/head |
OlderNewer