- 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
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
# 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
''' | |
# 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
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
# 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
# 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
# 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 |
Instruction provided by @invitu
1- Install Cups on the posbox:
- The posbox is a read-only system, you have to chroot it to install cups
- Run a posbox on a raspberry-pi and plug a pen drive containing another posbox image
- chroot the posbox in the pen drive
- install cups with apt-get
- plug the epson on the posbox
- setup a Raw queue using usb://EPSON/TM-T20II in cups and share it (remove the "?serial=xxxxxxx" part if you want to use the image with another printer
- there is no driver for epson printer for raspbian, that's the reason we must use raw queue
Constitution explains how and in what direction is the company growing
- The only way to compensate poorly made work is to improve yourself and do it well
- There are no any financial, moral, administrative penalties
- Inside the company, excuses have no sense