sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
Hierarchical data metrics that allows fast read operations on tree like structures.
Based on Left and Right fields that are set during tree traversal. When entered into node value is set to it's Left, when exiting node value is set to it's Right.
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
### yml | |
version: '2' | |
services: | |
web: | |
image: odoo:11 | |
depends_on: | |
- db | |
ports: | |
- "8069:8069" | |
volumes: |
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
Switching to another branch in git. Straightforward answer, | |
git-checkout - Switch branches or restore working tree files | |
git fetch origin <----this will fetch the branch | |
git checkout branch_name <--- Switching the branch | |
Before switching the branch make sure you don't have any modified files, in that case, you can commit the changes or you can stash it. | |
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
CREATE OR REPLACE FUNCTION public.vit_duplicate_account_journal(v_account_journal_id INTEGER) | |
RETURNS void | |
LANGUAGE 'plpgsql' | |
COST 100 | |
VOLATILE | |
AS $BODY$ | |
DECLARE | |
v_account_journal record; |
Backup db from odoo db manager inteface
the restore from command line:
pg_restore --format=c -U odoo -W -d <dbname> <backup_file.dump>
Backup manuyally
create systemctl service file
vim /etc/systemd/system/docker-odoo.service
file content is
from odoo import models, fields, api
import logging
_logger = logging.getLogger(__name__)
class account_move(models.Model):
_name = 'account.move'
PG+PGPOOL docker compose file
version: '2'
networks:
my-network:
driver: bridge
services:
pg-0:
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
;; database name = connect string | |
;; | |
;; connect string params: | |
;; dbname= host= port= user= password= | |
;; client_encoding= datestyle= timezone= | |
;; pool_size= connect_query= | |
[databases] | |
odoo1 = host=127.0.0.1 auth_user=odoo dbname=odoo1 port=5432 | |
odoo2 = host=127.0.0.1 auth_user=odoo dbname=odoo2 port=5432 | |
odoo3 = host=127.0.0.1 auth_user=odoo port=5432 dbname=odoo3 |