www.numberspeaks.com

BLOG

Linux

Odoo 9 Linux bash backup script

Bash backup odoo script is available on GitHub for Odoo 8 and 11. This bash script will help you to backup Odoo database, set a password on the backup file and remove files older than 7 days. You’ll need curl and 7zip linux package to make it work. This example is backing up od11-01 and od11-02 databases. It’s not really optimized with the double compression. BACKUP_DIR=/opt/backup ODOO_DATABASES="od11-01 od11-02" ADMIN_PASSWORD="ODOO_DATABASE_MANAGER_PASSORD" FILE_PASSWORD="ZIP_FILE_PASSWORD" TIMESTAMP=`date +%Y-%m-%d_%H-%M-%S` for DB in ${ODOO_DATABASES} do # create a backup curl -X POST \ -F "master_pwd=${ADMIN_PASSWORD}" \ -F "name=${DB}" \ -F "backup_format=zip" \ -o ${BACKUP_DIR}/${DB}/${DB}.${TIMESTAMP}.zip \ http://localhost:8069/web/database/backup 7z a …

Remote Mac computer from iPhone

CM – Remote Mac computers remote controller for macOS 13 Ventura and newer Control your Mac effortlessly from iPhone and iPad ApplicationsLaunch, exit and maximize program. SystemAdjust the volume, lock, put your Mac to sleep, restart from iPhone, iPad Installation of the macOS Agent is necessary. You can find the link below. CM – Remote works exclusively when both Mac and iOS devices are connected to the same network. Download Mobile App Mac computer Agent: CM Agent Latest version: 1.31 Designed to work with macOS version 13 Ventura and newer. Latest version: 1.34 macOS agent archive1.2 – Download1.3 – Download1.31 – Download

Start stunnel on Mac OS X Sierra startup

This file will start automatically sTunnel daemon on your Mac Os Sierra computer. sudo vi /Library/LaunchDaemons/macports.stunnel.plist <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>macports.stunnel</string> <key>Program</key> <string>/usr/local/bin/stunnel</string> <key>RunAtLoad</key> <true/> <key>ServiceDescription</key> <string>Stunnel</string> </dict> </plist> for more information concerning sTunnel, OpenVPN setup please read this post: Make OpenVPN stealthy with stunnel on Mac OS and Debian

zimbra

How to get the list of incoming connections with email addresses and geo localization in Zimbra

Bellow script will list incoming connections and remote ip geo localization of the server, it will search in logs file emails addresses related to the remote ip address. #!/bin/bash format="%30s %15s %20s %60s\n\n" header="%30s %15s %20s %60s\n" INFO=/tmp/info$1.tmp ZIMBRALOG=/var/log/zimbra.log* AUDITLOG=/opt/zimbra/log/audit.log* MAILBOXLOG=/opt/zimbra/log/mailbox.log* IPDB=ipinfo.io/ PORT=$1 COUNTER=0 echo "===========================================================" echo "Check connection on port $1" echo "===========================================================" echo "" printf "$header" "EMAIL" "IP" "COUNTRY" "HOSTNAME" echo "" IP=`netstat -an | grep ":$PORT " | grep "ESTABLISHED" | awk ‘{print $5}’ | cut -d ‘:’ -f1 | awk ‘!a[$0]++’` for i in $IP; do if [ $i != 0.0.0.0 ] && [[ $i != …

Problem with Godaddy VPS upgrade

I recently had a problem with Godaddy ubuntu 16.04 VPS, after updating and upgrading the system: apt-get update apt-get upgrade reboot SSH port wasn’t anymore reachable, it’s the only access we have to the server, however other services are working normally, so the system is still running. I tried many times to restart, call the support, but it didn’t solve the problem. The only solution was to destroy the server and rebuild it from scratch + restoration of backups. I’ve also tested the upgrade with a clean and freshly installed system, same issue occurred. If you’re running Ubuntu 16.04 VPS …

POS order to quotation in Odoo 9

Odoo 9 community does not have a button to generate from the POS (Point of Sale) Order a quotation (Sales Order), here is the following code of my module pos_2_so. Folders arborescence will have as sub folders :  model, view, static, ref the print screen : We will start by adding a new button on the interface of the pos, in the folder static/src/xml/, we create a new file named pos_2_so.xml. Bellow is its QWeb xml code : <?xml version="1.0" encoding="UTF-8"?> <templates id="template"> <t t-name="Pos2SoWidget"> <div class="pos2sopad"> <div id="pos-2-so-frame"> <button class="pos-2-so-button" id="pos-2-so-button">To Sales Order</button> </div> </div> </t> <t t-extend="ProductScreenWidget"> <t t-jquery=".leftpane …