- apply patch
- install hw_escpos on odoo
- run odoo with
-d DB_WITH_HW_ESCPOS --db-filter=DB_WITH_HW_ESCPOS
- in new terminal run
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
''' | |
# 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
# 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
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
// Step 1. Ask support team to set some temporar password on apps.odoo.com database | |
// Step 2. Login to https://apps.odoo.com/web in a usual way (via oauth) | |
// Step 3. Open browser console and change password by using js code below | |
odoo.define('www', function(require) { | |
"use strict"; | |
var ajax = require('web.ajax'); | |
// will only work after the password has been set by Odoo | |
ajax.jsonpRpc('/web/session/change_password', 'call', { | |
'fields' : [ |
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
# For understanding LXC see https://wiki.debian.org/LXC | |
# Based on: | |
# lxd + docker: https://stgraber.org/2016/04/13/lxd-2-0-docker-in-lxd-712/ | |
# lxd network (static ip): https://stgraber.org/2016/10/27/network-management-with-lxd-2-3/ | |
LXD_NETWORK="dev-network2" | |
# install lxd 2.3+ | |
apt-get install software-properties-common |
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 |
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
--- connection count | |
SELECT sum(numbackends) FROM pg_stat_database; | |
--- long running queries | |
SELECT | |
pid, | |
now() - pg_stat_activity.query_start AS duration, | |
query, | |
state | |
FROM pg_stat_activity |