2022 m. spalio 13 d., ketvirtadienis

Connecting to psql remotely dbeaver

The server requested SCRAM-based authentication, but no password was provided.
 Solution: Add progress password

 

$ sudo su - postgres
$ psql

 ALTER USER "postgres" WITH PASSWORD 'password';

 

 

FATAL: no pg_hba.conf entry for host "xx.xx.xx.xxx", user "postgres", database "postgres", SSL on

How to solve this error on dbeaver:

Find out where is your hba file:

$ sudo -u postgres psql 
postgres=# show hba_file;

 /etc/postgresql/13/main/pg_hba.conf

# Add at bottom your eg:  IP  111.111.11.11/21  trust
hostnossl    all          all            0.0.0.0/0  trust


Restarting service:
# /etc/init.d/postgresql restart
# service postgresql restart

Opening port
Firstly check if port is open:
$ namp -p 5432

Opening port to ubuntu 20.04
# nano /etc/postgresql/12/main/postgresql.conf

# Uncomment
Added listen_addresses = '*'

# Restart postgress Service
service postgresql restart

Odoo 15 fresh server install

Automated odoo github script:

https://github.com/Yenthe666/InstallScript

odoo conf file:

/etc/odoo-server.conf

Custom addons:

/odoo/odoo-server/custom_addons
It there is problems with enterprise module, you can create your own system service script:
Default systemd odoo-server service is changed to odoo.

///odoo.service - filename
[Unit] Description=odoo [Service] Type=simple Restart=always RestartSec=1 User=odoo ExecStart=python3 /odoo/odoo-server/odoo-bin -c /etc/odoo-server.conf Environment="ODOO_HTTP_SOCKET_TIMEOUT=30" [Install] WantedBy=multi-user.target


# Enable autostart when server is restarted

sudo systemctl enable odoo.service


Restart odoo server by:

sudo service odoo restart


Killing odoo server:

sudo service odoo stop #NEWLY CREATED SERVICE
sudo pkill -f odoo-server #OLD DEFAULT  GITHUB INSTALLATION

2022 m. spalio 2 d., sekmadienis

Odoo terminal chrome extension

Updating record:

Example:

-i id's

write -m stock.quant.package -i 277 -v "{'package_number': 'Diagon Alley'}"

write -m stock.picking -i 45,44,33,577,546,538,533 -v {partner_id: 490}


Installing multiple custom_extentions:

install -m stock_request,stock_request_direction